Daily Schedule
July 21, 2026 ยท View on GitHub
The Daily Schedule integration provides a binary sensor that gets its on / off state according to the user-defined schedule of time ranges.
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.
Contents
- Install
- Create Daily Schedule
- Daily Schedule Card
- Time Ranges
- Lovelace Card Configuration
- Attributes
- Triggers & Conditions
- Daylight Saving Time Handling
setAction- Additional Cards
- UTC Option
- Skip-Reversed Option
- Removing the Integration
Install
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).
Create Daily Schedule
Use this link:
Or, in the Home Assistant UI go through the following path:
=> Click "+ Create helper" button and search for "Daily Schedule".
This creates a binary_sensor.<name> entity with no time ranges configured yet. Use the Daily Schedule card to add the desired time ranges.
Daily Schedule Card
Install
You can add the Daily Schedule custom card to any dashboard by selecting "+ Add Card" in the built-in dashboard editor.
Usage
Use the card to view and set Daily Schedule time ranges:
Time Ranges
Each range has from and to. If to is less than or equal to from, it is treated as a 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:
- An absolute time (e.g. 12:30).
- Sunset with an optional negative or positive minutes offset.
- Sunrise with an optional negative or positive minutes offset.
By default, the card displays and edits absolute times with minute precision. Set the card's seconds option to true to display and edit absolute times with second precision.
Lovelace Card Configuration
Visual Editor
Code Editor
General
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| type | string | True | - | Must be custom:daily-schedule-card |
| title | string | False | - | Title of the card |
| seconds | bool | False | False | Whether to display and edit absolute times with second precision |
| card | bool | False | True if title is supplied | Whether to render an entire card or rows inside the entities card |
| template | string | False | Null | Template for rendering the value. Has access to entity_id |
Entities
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| entity | string | True | - | The binary_sensor entity ID |
| name | string | False | Friendly name of the entity | Name to display |
| template | string | False | Null | Per-entity template (overrides card's template) |
Note: the plain entity ID string can be specified (with no entity:) if there is no need to use other attributes.
Entities Card Example
type: entities
entities:
- type: custom:daily-schedule-card
entities:
- entity: binary_sensor.venta_schedule
name: Venta
Entire Card Example
type: custom:daily-schedule-card
title: Timers
entities:
- binary_sensor.swimming_pool_filter_schedule
Template Example
type: custom:daily-schedule-card
card: true
template: >-
{{ state_attr(entity_id, 'effective_schedule') |
map(attribute='from') | map('truncate', 2, True, '')
| join(' | ') }}
entities:
- binary_sensor.let_the_dog_out
Attributes
The binary sensor has the following attributes:
Schedule: the list ofontime ranges as provided by the user.Effective schedule: the actualontime ranges: (1) disabled ranges are ignored, (2) dynamic times (sunrise / sunset) are resolved to absolute time (changing daily), (3) the user-provided ranges are merged and duplications are removed, i.e. the list doesn't have 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.
Triggers & Conditions
The integration provides triggers and conditions for use in automation rules:
| Trigger | Fires when a targeted entity... |
|---|---|
daily_schedule.turned_on | turns on |
daily_schedule.turned_off | turns off |
| Condition | Passes when a targeted entity is... |
|---|---|
daily_schedule.is_on | on |
daily_schedule.is_off | off |
trigger:
- trigger: daily_schedule.turned_on
target:
entity_id: binary_sensor.backyard_lights
condition:
- condition: daily_schedule.is_on
target:
entity_id: binary_sensor.backyard_lights
Both triggers and conditions accept the standard entity-target options: behavior (each / first / all for triggers, any / all for conditions, when targeting more than one entity) and for (a minimum duration the state must hold).
Notes:
- Only Daily Schedule entities are matched, even if the target (e.g. an area or device) also includes other, unrelated entities.
- A transition from
unknownorunavailable(e.g. right after a Home Assistant restart) never fires a trigger, and such a state never satisfies a condition.
Daylight Saving Time Handling
When the local timezone transitions for daylight saving time (DST), the logic handles edge cases explicitly:
-
Forward gaps (non-existent times)
When DST starts, the clock jumps forward and certain local times do not exist (for example, from01:59directly to03:00). If a scheduled toggle falls within this missing interval, it is advanced to the next valid local time. For example, if the schedule defines a toggle at02:30, it will be adjusted to03:00. Note that ranges overlapping the forward gap will run for a shorter duration than intended on the day DST begins. -
Fall-back ambiguity (repeated local times)
When DST ends, the clock moves backward and a local hour repeats (for example,01:00โ01:59occurs twice). In this case, toggles within the repeated interval may occur twice, distinguished by their fold value. For example, if the schedule contains a single range00:30โ01:30and the current time is00:00, the next four toggles will be:00:30(on,fold=0)01:30(off,fold=0)01:00(on,fold=1) โ the clock has moved backward. Note that01:00is never a toggle, except here.01:30(off,fold=1)
Ranges overlapping the repeated interval will therefore run longer than intended on the day DST ends.
set Action
daily_schedule.set action can be used to configure the time ranges. Here is an example:
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.
Each range also supports an optional disabled boolean field. When set to true, the range is kept in the schedule but treated as inactive (equivalent to temporarily removing it). The card's toggle switch sets this field.
Notes:
- It's uncommon to perform this action directly. Its main usage is indirectly via the Lovelace card.
- 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') }}
Additional Cards
Timer Bar Card supports this integration. end_time must be configured as follows:
end_time:
attribute: next_toggle
By default it counts down the time until the end of the current time range. active_state can be used to count down the time to the beginning of the next range instead:
active_state: 'off'
UTC Option
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. This option should not be used when sunrise or sunset are used since they are resolved by using the local time zone.
Skip-Reversed Option
When enabled (disabled by default), this option ignores any time range with sunrise or sunset where the to time is earlier than or equal to the from time. This behavior is dynamic. For example, a range defined as sunrise โ 7:00 AM may become reversed during parts of the year if sunrise occurs after 7:00 AM. In such cases, the range is applied only when sunrise is earlier than 7:00 AM, and automatically skipped when sunrise is at 7:00 AM or later.
A time range with absolute from and to times is never skipped, even if it's reversed and this option is enabled. Such a time range should be deleted or disabled manually if it's not needed.
Removing the Integration
-
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.
Contributions are welcome!
If you want to contribute to this please read the Contribution guidelines