My hot tub uses a third party controller that will randomly turn off its Economy Mode during expensive power times of the day. I have an automation that notifies me when this happens based on the time of day (ie Off Peak and Peak times should have Economy Mode On).
I don’t automatically turn it off because there can be times when we do want the heater to turn on in peak times.
What I’ve noticed is that when this turns off on its own, the logbook shows an event that has no “triggered by”, and whenever an automation or a direct interaction makes a change to this state, it has “triggered by” extra data
In this case, I want to only trigger an automation when the switch “turned off”. Happened twice today.
This integration isn’t turning off at known times like when HA reboots, or when the communication module loses connection. At least I haven’t found other ways to tie ths to a fluke/unwanted event vs a wanted event.
If context.id, context.parent_id and context.user_id are all none than that means the change was not by switching the physical device, the HA user interface or an automation. i.e. the device itself changed.
Yeah, in that case there is a Parent-id! So it seems that the kind of trigger defines if there is a parent or not. Would there be more exceptions like this that could behave like the time trigger?
I think most of my triggers will be boolean or binary sensors so it seems pretty reliable then!