I use input_booleans as a placeholder for the state of some devices connected to a third party system that I've integrated with my HA system using the HA API. This all works great except when my HA system is rebooted, for example when installing an update. When that happens the input_boolean can become out of sync with the state of the device connected to the 3rd party system because the reboot process will force the startup state of the boolean to be sent to the 3rd party system. Is there a way for the state of an input_boolean to be persistant so it is restored to the state it was in before the HA system was rebooted? In the vast majority of cases this would match the state of the device in the 3rd party system. Thanks in advance for the help.
#Persistence of input_boolean state during reboot
1 messages · Page 1 of 1 (latest)
input_boolean is normally kept after the reset. I guess what you want is the automation that fires on either input boolean change or on the HA started event?
I think you just have a desync between HA helper state and actual state after the reset.
Did I understand your problem correctly?
Thanks @formal summit . In my case it isn't an automation that fires but simply the internal HA engine for the API that sends boolean states to the 3rd party system. But, I could use an HA shutdown event and an HA started event to trigger logic in the 3rd party system that would keep boolean states from propagating from HA and force the 3rd party system to set the states in HA instead. Do HA shutdown and startup events exist? Thanks again
Yes they do, you can fire the automation on HA started or HA shutdown