At the moment there is no schedule entity type in HomeAssistant for interfacing with a schedule that exists on-device (eg Tasmota timers).
An entity type like this for developers to use that has start/end times and eg switch state or temperature setpoint for multiple different devices would be super useful - having the schedule run by HA helpers/automations just opens up so many more points of failure for something like a thermostat or immersion heater when you only change the schedule a handful of times a year.
At the moment my solution for my Heatmiser thermostat custom component is to expose an absolute tonne (126 total) of time and number entities attached to each thermostat device for each of the Monday-Sunday Period 1-6 start, stop, setpoint/switch status, but this a) feels very hacky/clunky and b) is missing a nice UI in HA(!).
Is this pretty niche? Yes, but hopefully there will be some likeminded souls/devs who have also been missing this!
(Also I’m half hoping someone can tell me I’m missing the obvious and it does already exist somehow!)
There is a schedule entity type.
So the above link is for the schedule integration, not a schedule entity type. The difference being that the schedule integration runs on HA itself, whereas what I’m looking for is an entity class/type to interact with a schedule that runs on the smart device itself (eg the thermostat).
My issue with the schedule integration is that it’s reliant on a good, consistent connection to HA - if I reboot at just the wrong time, or if my core network switch fails, or I need to update my hypervisor etc, the schedule won’t run on the end device properly.
Apologies if that wasn’t clear in the original post - let me know if this is still confusing!
It creates schedule entity types:
You would need an integration for that. It can use the existing schedule entity type.
What needed is an addtion to the API with esphome to add a schedule to a entity that runs on the device regardless if network / ha are up. I started work on a esphome component to do the device bit last year but ran out of time. Might revisit over the holidays. But im a bit daunted by how to extend the api.
ESPHome is not part of WTH.
No but the schedule helper and api is.
ESP home is just an example. Many devices, like Shelly for instance, feature integrated schedule options. As of now, I had to build a specific automation to handle Shelly schedules.
So I’m trying to develop an integration that does it - the WTH (for me) is the fact that HomeAssistant doesn’t have the framework in place for integration developers to implement on-device schedules elegantly!
There’s no mention of this schedule entity class in the developer docs anywhere, so I suppose if it does indeed exist in HA, the question ought to be WTH doesn’t the schedule entity class exist in the developer docs?(!)
The logical place for it would be here, same as every other entity type that is available to developers: Entity | Home Assistant Developer Docs
I’ll do some reading, but as far as I’ve been able to find there’s no way to use this schedule entity type in my integration (and I’m also not 100% sure it does what I’m describing above).
At this point, it might be better suited as a feature request, as there seems to be a bit of confusion as to what exactly the original WTH was about.