I would like to create a kind of push button or a link that I can use to trigger an automation. I’m thinking of something similar like activating a scene.
Does anybody know how to create something like that?
I would like to create a kind of push button or a link that I can use to trigger an automation. I’m thinking of something similar like activating a scene.
Does anybody know how to create something like that?
An ‘input_boolean’ would be the perfect solution
It appears in HA as a switch, you’d just need to set your newly created input_boolean to trigger your automation
trigger:
- platform: state
entity_id: input_boolean.your_new_input_boolen
to: 'on'
Depending on what your automation is, you might want one of the action to be to turn the input_boolen back off
action:
service: input_boolean.turn_off
entity_id: input_boolean.your_new_input_boolen
Have Fun !!
You can always have a script rather than an automation, which might appear as a switch, like this (can_cancel: true
in customize) --> it will go back to turned off as soon as the script ends:
or as a link, like this (can_cancel: false
in customize):
Hope this helps.
When you’re looking for a stateless “trigger”, I think a script represents this a little better.
Could you please explain it for noob.
I’m trying to set automation trigger but get always errors