I have an automation that shuts off, waits, and turns on a smart switch when a sensor reports excessive errors.
To avoid an infinite loop situation, whenever that automation fires, in addition to notifiying me and restarting the device, it increments a counter. When the helper.counter hits 3, it stops restarting the device and only notifies me.
I want to make another automation that fires whenever helper.counter is incremented, and counts out 24 hours. If 24 hours pass without changes, it should reset the counter to zero.
My understanding, however, is that such an automation will not survive a HA restart. Am I correct? Is there any way to make it survive a restart, meaning if I happen to restart HA during the 24 hours it will still reset the counter to zero?
