A Run Once Automation

Hi, I’m trying to create an automation which will run only once every time it’s enabled/turned on. For instance, currently I have an automation to heat the hot water in the morning. It turns on at say 06:30 in the morning. I have a second automation that runs at midday every day to turn off the first automation so that it will never run more than once. But this seems a bit of a hack and i’d prefer to just have one automation to handle the functionality of both. Preferably the first automation would turn itself off as soon as it fires. Is there a way to do this? thanks in advance.

The service registry has an automation.turn_off service; try using that at the very end of your automation.

1 Like

Thanks that did the job. I’m wondering why I didn’t think of that myself.

1 Like