---
title: "Recurring task"
description: "The recurring task helper keeps track of one thing that comes back, like changing the air filter every 90 days. A sensor says when it is due, a button marks it done."
canonical_url: "https://spook.boo/recurring-task"
---
# Recurring task

> The recurring task helper keeps track of one thing that comes back, like changing the air filter every 90 days. A sensor says when it is due, a button marks it done.

The recurring task helper keeps track of one thing that comes back. Change the air filter every 90 days. Descale the coffee machine every month. Put the bins out every Tuesday. Or service the heat pump every 2000 hours it ran.

You get three entities: one that says the task is due, one that says when it is due next, and a button to press when it is done. One task per helper. No points, no people, no chore app.

## Creating a recurring task helper

Add one directly to your own instance by selecting the My Home Assistant button below:

[![Open your Home Assistant instance and start setting up a new integration.](https://my.home-assistant.io/badges/config_flow_start.svg)](https://my.home-assistant.io/redirect/config_flow_start/?domain=spook_recurring_task)

Or add one by hand:

1. Go to **Settings** > **Devices & services**, and select the **Helpers** tab.
2. Select **+ Create helper**.
3. Search for **recurring**, and select **Recurring task 👻**.
4. Give it a **Name**, like "Air filter".
5. Fill in the **Interval**: how many days between two times.
6. Pick how it **Repeats**. What the two do is explained [below](#after-done-or-every-interval).
7. Optionally, pick a sensor to **Count with**, instead of days on the calendar. More on that [below](#counting-hours-instead-of-days).
8. Optionally, fill in when it was **Last done**, if you know.

![The recurring task helper dialog, filled in for an air filter every 90 days after done.](https://spook.boo/images/screenshots/en/light/helper-recurring-task.webp)

9. Select **Submit**. Done! 🎉

Changed your mind later? Open the helper from the **Helpers** tab, and change the interval, the repeat or the sensor to count with in its options.

## How it works

The helper adds a device with the name of the task, holding its three entities.

![The device of the air filter task, with its due binary sensor, its next due sensor and its done button.](https://spook.boo/images/screenshots/en/light/recurring-task-device.webp)

The air filter, due again in two months.

- **Due:** a binary sensor. On from the moment the task is due, until it is done.
- **Next due:** a sensor holding the moment it is due next. Its `last_done` attribute holds when it was done last.
- **Done:** a button. Press it when you did it, and the count starts over.

Use **Due** to get a notification, or to show the task on a dashboard only when it needs doing. Press **Done** from that same dashboard, or from an automation.

### Due at midnight

A task is due at midnight at the start of its due day, in the time zone of your home. Done today, every 7 days, is due at midnight a week from today. Also in the week the clocks change: the helper counts days on the calendar, not hours, so it never shifts to 23:00 or 01:00.

### A new task

A task that was never done is due right away. Nobody knows when the filter was changed last, and the helper does not pretend to. Do it, press **Done**, and the count starts.

Know when you did it last? Fill in **Last done** when you create the helper, and it counts from that day instead.

### Forgot to press done

Did it on Saturday, but forgot to press the button? Open the helper's options, and pick the day under **Done on**. The task counts from that day. The field is empty again the next time you open the options: it is a moment, not a setting.

## After done, or every interval

**After done** starts counting again when the task is done. Change the filter 90 days after the last time. Done a week late, and the next time is a week later too.

**Every interval** keeps a steady rhythm. The bins go out every Tuesday, even when you were a day late last week. Done late, the next time stays where it would have been. Done early, that counts for the time that was coming. Missed a few altogether, and the task is due on the next day of the rhythm, not a pile of times at once.

## Counting hours instead of days

Some things wear with use, not with time. A heat pump wants a service every 2000 hours it ran, not every year. Pick a sensor to **Count with**, and the helper counts what that sensor counts, instead of days on the calendar. The **Interval** is then in the unit of that sensor, like 2000 hours.

The sensor has to keep counting up, like the total hours a heat pump has run, or the total of a utility meter that never resets. A sensor that starts over, like hours today, does not work: the task would never come due.

Counting with a sensor, the helper has a **Remaining** sensor instead of **Next due**. It holds what the sensor still has to count before the task is due, in the sensor's own unit, like 420 hours. Below zero, the task is overdue by that much.

The helper keeps counting in the unit the sensor had when it started. Show the sensor in another unit later, like minutes instead of hours, and the helper converts it back. A unit it cannot convert, and the helper cannot tell until the sensor is back in its old unit.

Why not a date? A date would be a guess from how fast the sensor counted so far, and a guess that is wrong when the winter is colder than the last one. The helper does not make up values. What is left reads at a glance, and makes a good graph.

When the sensor is unavailable, the helper cannot tell. **Remaining** is unavailable, and **Due** is unknown, until the sensor is back. Pressed **Done** while it was away? The helper counts from the first reading that comes back.

Picking a day under **Done on** for a task that counts with a sensor counts from the reading now. What the sensor said on that day is not known.

## Attributes

The **Next due** sensor:

| Attribute | Description |
| --- | --- |
| `last_done` | When the task was last done. |

The **Remaining** sensor, when counting with a sensor:

| Attribute | Description |
| --- | --- |
| `entity_id` | The sensor it counts with. |
| `last_done` | When the task was last done. |


## Sitemap

See the full [sitemap](https://spook.boo/sitemap.md) for all pages.
