I have an automation that enables guest mode at the house when guests are visiting. Basically, I have an input_boolean that when toggled triggers a device_tracker.see on a person.guest. What often happens is I often forget to toggle that back when guests leave. To fix this i was playing around with Actionable Notifications to send me a notification every 24hrs to see if the guests are still here. the flow looks like this
This is working ok, but… last time a guest was visiting, I did some updates to home assistant and the automation breaks because of a restart. Is there a way to make it survive a restart?
My thought was to add another trigger to check if home assistant had restarted and the timer was still running (the timer is set to restore), to fire another actionable notification. if that works, what happens to the old notification that was fired? i am not sure if that is the best way to handle this?
All though Home Assistant is capable of doing things like 24 hour delays, it is not recommended for reasons that you state.
The suggested way to do that is with separate automations or triggers that are based on time. For example, instead of triggering and waiting 24hrs in a delay or wait, trigger and store the time in as helper. Then have a second Automation or trigger that watches the helper + 24hours to trigger again. That kind of thing.
thanks, hadn’t though of that. let me give that a whirl and see if i can make it work. [edit] I think it will work if i modify my original automation to enable the guest mode and set a timestamp in a helper when it is enabled. then in my actionable notification i can check that timestamp to fire the notification or reset the timestamp for the next iteration. something like this: