#Create an automation with an action
1 messages · Page 1 of 1 (latest)
Yes
Perhaps that wasn't the answer you were looking for? Maybe a little more detail in the question could help.
Could you point me to the right place in the documentation? I've looked but not been successful.
Automations have triggers, conditions, and actions. That's what they are
Perhaps read this and rephrase your question: https://www.home-assistant.io/docs/automation/basics/
An automation without an action would be useless
I am aware of that. I want to create a temporary automation as the result of an action. e.g. trigger: when button is pressed, condition: if automation 'foo' does not exist, action: create automation 'foo' with trigger time 1 hour in the future, action: turn off light.
if automation 'foo' does exist, it can be overwritten.
so the condition is really just to illustrate that I am aware of what a condition does.
You cannot create automations at runtime
You can schedule actions using a calendar and an automation that fires when the calendar event starts. Unfortunately, there aren't currently actions to edit or delete calendar events... so the "check if it exists, overwrite" portion of your goal isn't possible.