Some devices and frameworks (Like Tasmota) have automation capabilities for example: rules and timers.
Now wouldn’t that be cool and very practical if HA could use some of this automation instead of doing everything on the server side?
This can also be more effective, for example if an irrigation device is started but then the communication is lost with the device, so the water flow is never shut down!
If the device had the knowledge of how long to keep the device open, then it can do that independently.
Ultimately whatever is powering the device needs to have some type of dead man switch. I don’t use it but I understand ESPHome has this capability for example if WiFi is lost. I have a timer module with a zigbee switch to act as a kill device.
I’ve also been thinking about something like this recently. It would be great if there was a way to “push” automations to integrations, if possible. Two quick examples:
Automation that turns a Zigbee light on when a Zigbee switch is pressed → ZigBee binding
Automation that turns an ESPHome output on at a certain time of day → ESPHome automation
The value this would bring is response speed and ease-of-use. For something as simple and common as the first example (Zigbee switch and light) I can in my setup (Tradfri switch and bulb, Sonoff stick and Zigbee2MQTT) see a noticable delay, enough to be annoying but not enough to lose the convenience of having all automations in one place. For ESPHome it would solve this feature request; UI editor for ESPHome automations.
Cross-integration automations would be outside of this scope I think (with some exceptions, for example the sun integration is also available on ESPHome).
How I imagine this would be implemented:
When an automation is saved, each of the integrations involved is asked if it could implement it itself
If so, a switch is presented in the automation editor that allows the user to enable the integration to handle it
If the switch is enabled, on each save of the automation it is sent to the integration
Automations that work this way get some icon to mark this in the automation list
Traces etc. would not be available
In the integrations, it would look like this:
When asked if an automation is supported, the integration would check if it can provide the same functionality
When an automation is sent to the integration, it would adjust itself accordingly (establish ZigBee bindings, update ESPHome configuration, etc.)
Possible future additions:
Support for traces in some integrations (they could still report back what happens)
Some way to debug why a certain automation cannot be pushed to any integration (integrations would need to not just respond with a true/false state, but also some form of “error”), for example if some logic is used that cannot be replicated