I have ADHD. I use Home Assistant to control my own behavior.
For example, at my bedtime, an automation runs that turns off all of my electronics and keeps them off until sunrise. This, and other HA-based interventions, are extremely useful to me. No more accidentally playing Civ till sunrise.
The problem though is that I can terminate currently-active automations by restarting HA, or by turning the automations off. For example, my big current hurdle is that during my morning alarm automation, I restart HA through the app/turn the server off/unplug the morning-alarm-sound-playing speaker so I can go back to sleeping.
What can I do to discourage or prevent turning off/restarting HA? I’m considering several options.
Lock the HA server behind a HA controlled lock box, so that I cannot physically touch the device.
Create a custom fork of the mobile app with the Restart/Turn Off buttons disabled.
Create an automation that runs whenever HA starts that acts as a severe punishment, such as playing deafening music for 30 seconds or withdrawing $100 from my account and donating it. However, I have to create a number of these automations and forget their names as I can just manually turn them off before restarting through the app.
(As an example of what kind of suggestion I’m looking for: I was unplugging the speaker, so I bought a wireless battery-powered one and glued it to the ceiling. This means it’s easier to follow the behavioral-pathway-in-form-of-HA-automation that leads to the speaker being shut off than it is to disable the speaker itself).
Whatever you do, I suggest avoiding the approaches in your first and third bullets. Rendering it unnecessarily difficult to gain administrative privileges on your Home Assistant instance is asking for trouble becuase things can and do go wrong: hardware fails, software bugs crawl out of the woodwork (as do bugs in our own automations, sometimes after the automations seemingly worked just fine for a long time), and security breaches happen. You need to be able to address these kinds of issues, though how serious they are depends ultimately on how much you rely on HA and the rest of your network. (Bullet 3 seems like… you’d have to “donate” a lot of money to even get the automation working reliably; and then exacerbates bullet 1, because if your HA instance has the ability to donate money on your behalf, it becomes a much more attractive target for a security intrusion).
Why do your automations stop woriking when you restart HA? That’s not how people normally set up automations. Restarting HA can trigger automations if you set them up that way, but it shouldn’t be turning them off unless you’ve specifically done something to make that happen (and if so, why)?
If you just want to make it a pain in the butt for yourself to manually disable automations, keeping in mind that it could potentially inadvertently make it a pain in the butt to disable them when you need to (e.g., because they’ve broken and are flashing all of your lights and blaring alarm sirens on all of your speakers), you could create a large number of automations that trigger on when an automation you care about becomes disabled, and automatically re-enable them. Though I can’t promise you that you won’t find some enterprising way around that.
Or, as an alternative, figure out another way to set the wake time, for example using an input_datetime helper.
As another potential alternative, perhaps the integration can fire an event at a scheduled time. Or, write a script that fires an event and have that be the script that your scheduler runs. Then trigger your automations based on the event trigger.
to prevent a HA restart from blocking an automation that is supposed to keep repeating then you can add a homeassistant started event trigger to the automation:
triggers:
- trigger: homeassistant
event: start
the problem with that is going to be that you will need to set conditions for the automation to block it from running when it’s not needed during a “normal” restart. That could get complicated depending on the requirements but it’s doable.
as to the other things you could try putting your phone in an inconvenient place to get to like in another room when you go to bed. if you lock up the HA server don’t use HA itself to control the lock. you can put the key someplace hard to get to - like in a block of ice in the freezer.