The Daily Schedule integration provides a binary sensor that gets its on
/ off
state according to the user-defined schedule of time ranges.
There is a corresponding Lovelace card which should be used for configuration. To open the card installation page inside HACS click here.
Automation rules can be built with the daily schedule entities as demonstrated here.
Note: The built-in Schedule integration can be used when a weekly schedule is needed.
HACS is the preferred and easier way to install the component. When HACS is installed, the integration can be installed using this My button:
Otherwise, download daily_schedule.zip
from the latest release, extract and copy the content into custom_components/daily_schedule
directory.
📌 Home Assistant core restart is required once the integration files are copied (either by HACS or manually).
Use this link:
Or, in the Home Assistant UI go through the following path:
=> Click "+ Create helper" button and search for "Daily Schedule".



Each range has from
and to
. If the to
is less than or equal from
it's treated as time in the following day. One interesting case is when from
equals to
. This type of range covers the whole day (always on).
There are 3 ways to specify time:
- A fixed time (e.g. 12:30).
- Sunset with an optional negative or positive minutes offset.
- Sunrise with an optional negative or positive minutes offset.
The binary sensor has the following attributes:
Schedule
: the list ofon
time ranges as provided by the user.Effective schedule
: the actualon
time ranges: (1) disabled ranges are ignored, (2) the user-provided ranges are merged and duplications are removed. This list doesn't include overlapping or adjusting ranges.Next toggle
: the next time when the binary sensor is going to change its state.Next toggles
: a list with the 4 next times when the binary sensor is going to change its state. The 1st element is identical toNext toggle
.
daily_schedule.set
action can be used to configure the time ranges. Here is a YAML-mode example, although it's recommended to use the UI-mode:
action: daily_schedule.set
data:
schedule:
- from: "↓-30"
to: "22:00"
target:
entity_id: binary_sensor.backyard_lights
The format of from
and to
can be one of the 3 options:
- Absolute time: a 24h time in this format.
- Sunset: start with "↓" and can have an optional positive or negative offset in minutes. For example: "↓", "↓-20", "↓+30".
- Sunrise: start with "↑" and can have an optional positive or negative offset in minutes.
Typically, there is no need to use this action directly since it's been used by the Lovelace card.
Note: there is no corresponding get
. The data already exists as attributes:
{{ state_attr('binary_sensor.backyard_lights', 'schedule') }}
{{ state_attr('binary_sensor.backyard_lights', 'effective_schedule') }}
Timer Bar Card supports this integration. end_time
must be configured as follow:
end_time:
attribute: next_toggle
By default it countdowns the time till the end of the current time range. active_state
can be used for counting down the time to the beginning of the next range (instead):
active_state: 'off'
When UTC option is set (not the default), the time should be expressed in UTC instead of local time. This option can be used when absolute time is needed, which is not impacted by daylight saving changes throughout the year. This is an advanced option that should not be used in the majority of the use cases. It should be used only if there is a very concrete reason to do so.
-
Delete the configuration:
- Open the integration page (my-link). Delete all helper entities by clicking the 3‑dot menu (⋮), and selecting Delete.
-
Remove the integration files:
- If the integration was installed via HACS, follow the official HACS removal instructions.
- Otherwise, manually delete the integration’s folder
custom_components/daily_schedule
.
📌 A Home Assistant core restart is required to fully apply the removal.
If you want to contribute to this please read the Contribution guidelines