Automation running once a day

Please add a simple way to make an automation run only once a day that can survive a reboot and without having to write templates or use input booleans. This is something I truly miss coming from Smartthings.

You mean like this:

trigger:
  - platform: time
    at: "12:00:00" # or whatever time you want, every day.

I mean more like making sure an automation only runs once after it’s already been run.
For example: I have an automation that closes the blinds once motion is detected between 7pm and 10pm but on rare occasions, my wife opens the blinds herself for whatever reason after the initial automation has run. So since the blinds are open, the automation triggers again and closes the blind which she doesn’t like.

I had to circumvent this by tying an input boolean to the blinds automation that uses the input boolean’s state as a condition for triggering the automation. I learnt that simply adding a delay wouldn’t work if HA restarts. I’d just like an easier solution to this in the UI. I have many automations that require it.

Ok, instead of an input boolean for each automation just put this action at the end of each automation that you only want to run once a day:

- service: homeassistant.turn_off
  target:
    entity_id: automation.<the_automation_id_here>

Then create one automation that turns all the other automations back on at midnight.

Am I right in assuming this action will turn off the automation once it runs. And then another automation turns them back on at midnight? This looks much easier, thanks a bunch

Yes that is correct.

The advantage is that you only need one automation to turn all the other automations back on, rather than having one input_boolean for every automation and a way to turn them all back off too.

1 Like