One-shot actions (e.g. egg timer)

Occasionaly I want to have an automation that runs only once. For example.:

You go out to dinner and know you’ll be home at 21:00 - Set an action at 20:30 so you return to a warm house
Send a reminder in 1 hour to check the oven

Effectively, the automation should run and then remove itself.

Is there a blueprint for this?

Yes.

1 Like

Thanks! It is possible for the automation to completely delete itself instead of disabling?

There’s no service call to delete automations (or scripts, scenes, devices, entities, etc).

That’s a pity… It’s also a pity that I need to make up a name for the new automation. I would really want it as simple as possible: action, date and go.

Do you use any voice assistants? If you do, you can explore the possibility of asking the voice assistant to remind you to check the oven in an hour. No blueprints, automations, naming, not even raising a finger to click a UI button.

Nice suggestion. I do not have voice assistants (I don’t like to be eavesdropped all day) but of course I have simple egg timers and so on for reminding. But I want something to happen, not just a reminder.

If you want something to happen at a specific time using Home Assistant, you will need to create an automation. The blueprint I suggested is a quick way to accomplish that (and it meets your other requirement that it must run just once).

If don’t want to use the blueprint, or a voice assistant, you may consider exploring the possibilities offered by the Conversation integration. It offers a means of telling Home Assistant to turn a device on or off. I don’t know if it can be enhanced to do that at a specific time but that’s something you can explore.

Other than what I mentioned, there’s nothing else I can think of in Home Assistant that can do what you want (perform an action once at a specific time without creating an automation).

Don’t get me wrong, I don’t mind the creating of an automation. I just would want this automation to vanish after it has done its duty.

You can create a Feature Request for an automation.delete service call.

If such a service call existed, it could be used in the blueprint I suggested.

1 Like

If your Feature Request is ever implemented, I’ll use it in my blueprint. Until then you can use the blueprint as-is or explore the possibilities offered by the conversation integration and the intent_script integration. Let me know what you decide to do.

Thanks. I gratefully use your blueprint, but often I use

echo hass-cli turn_on switch.sleepingroom_blankets | at 18:00

(I’m on linux)