Much of the time, I am working on Home Assistant during the evening hours after my children have gone to bed. I have some automations that give them warnings when it’s nearly lights-out time and block them from turning certain lights back on. I’ve been working on fortifying these against restarts so a trigger is not missed if I restart HA at specific times.
That got me thinking that it would be nice to be able to disable manual system restarts so I can’t click the restart button at very specific times. Sure I could not be braindead and just not click the restart button, but also, I know me and there will be a time when I click restart at 9:14:50pm and I miss the time trigger for 9:15:00pm because the system hasn’t finished restarting yet.
If there is already a way to prevent this (aside from me not being a zombie) then I haven’t figured it out yet and I apologize.
Curious if this could be taken further, and provide the ability to conditionally prevent all restarts.
I have a somewhat similar use case in that I want to prevent restarts in certain scenarios. I typically work on HA early in the morning and today I did an update without thinking and it stopped the white noise stream in the bedroom and woke up my wife.
If there was a way (via configuration, automation, whatever) that you could prevent a restart from any method (not just via the button) based on your own criteria, I think that would be extremely useful. For me it would be as simple as not allowing a restart while white noise is playing, but one could set it up however they like.
The card-mod example does seem to work for its intended purpose, but it has limitations. Being UI based it is only going to catch UI events, and in my quick tests it did not work on mobile either.