Scheduler integration for HA
In my house I have quite some devices that I want to control based on the time and day. For a while I have been looking for an easy way to set up and manage the automations that control them. HA has lots of functionality, but some things (such as automations), are not as simple to use as I would like. So, I decided to create my own scheduler integration. With a mobile-friendly Lovelace card for managing it.
What is the scheduler integration?
The scheduler integration is an alternative for HA automations which use the
sun as trigger. The integration can be used to define rules (schedules) such as:
- Turn on the garden lights at sunset, turn them off at sunrise
- Set my thermostat to 20C every morning at 8:00
- Trigger a script to back-up my HA config, every Sunday at 21:00
These rules are represented as
switch entities in HA. So you can turn them on/off as you desire. The time tracking and execution of the action happens on the background.
This is all maintained by the scheduler-component. I guess you could say that the scheduler-component is kind of the “brains” behind the operation.
Then there is the scheduler-card. This card is a user-friendly interface for controlling the component. In a few clicks you can set up a new schedule. The entities in your HA config and the actions they support are automatically detected.
See it in action
Persistent storage Once a schedule is created with the card, it will be added to HA and starts watching the time. No reloads or restarts needed. Same for editing or deleting schedules. Ofcourse they will be still there after you restart HA.
Compatibility Nearly all entity types can be scheduled, together with all possible actions (services). The card automatically checks which entities you have in HA and they will show up with their actions.
Customization The card can be set up in YAML mode or with UI editor. You can choose which device (types) you want to show up and customize display options. You can also set up your own entity configurations with custom actions, and define your own entity groups (YAML only). If you like, you can place scheduler-card in any of your Lovelace view.
Sun integration The scheduler component has support for the sun integration. You can choose to trigger a schedule at sunrise or sunset and add an offset. The time will automatically be adjusted with updates of the sun entity
Translations The card is available in 10+ languages. The language setting is automatically detected from your HA account. If yours is not there, it can be added with a little bit of help from your side.
Time schemes Time schemes allow you to divide the day in time slots. You can control what your device should do in which moment of the day.
Workday integration The scheduler component has support for the workday integration. You can use it to define how your workweek looks like and which days are your holidays. Select workdays or weekends in the scheduler and the schedules are adjusted for it.
Action retries If your entity is down (unavailable) when a schedule is due, the scheduler will wait for it to become available, and then execute the action. This is very practical with restarts of HA.
Multiple entity/actions Support for turning on several devices at the same time. Or turn on the radio, set it to FM, and change the volume. Coming soon.
Conditions Only want to have your robot vacuum start if you’re not home? You will be able to add condition checks that check the state of HA entities before the actions are applied.
Live view The overview of the card will show how much time remaining until a next action is triggered, for each schedule.
Check the scheduler-card issue list for more ideas.
How can I get it?
You can download the files directly from GitHub and add them to your HA config, but also HACS is supported. Follow the instructions on the GitHub pages.
The scheduler-card for Lovelace:
Support, issues and feature requests
If you run into trouble setting up the integration in HA or you don’t know how to use the scheduler, please ask your questions here in this thread. Many users have walked the same road as you do, so its usually a quick fix.
For issues (bugs) and feature requests, please use GitHub.
Make sure that you choose the right repo (scheduler-component vs scheduler-card) for your issue or request. Also check if if there is already an open issue for it.
If you’re really happy with the scheduler, consider buying me a coffee!
In this way you motivate me to keep supporting my work. Thank you!