Hi
can someone tell me how link this button with the automation? I whant to trigger an automation with one UI button
this is my code:
entity: switch.cuarto_luis
hold_action:
action: call-service
service: automation.trigger
show_icon: true
show_name: true
tap_action:
action: toggle
type: entity-button
1 Like
mcarty
(Arturo)
February 23, 2020, 3:47am
2
You are missing the automation itself:
- entity_id: automation.whatever
1 Like
petro
(Petro)
February 23, 2020, 4:26am
3
Specifically entityid needs to go in the service data field
Thanks, but istill dont work. do I do something wrong?
entity: switch.cuarto_luis
hold_action:
action: call-service
service: automation.trigger
entity_id: automation.porton_test
show_icon: true
show_name: true
tap_action:
action: toggle
type: entity-button
petro
(Petro)
February 23, 2020, 11:59pm
5
yes, you still haven’t put the entity_id inside service_data yet hint, you’re missing service_data…
I´m duumy it is working now:
- entity: switch.portones_luis
tap_action:
action: call-service
service: automation.trigger
service_data:
entity_id: automation.porton_test
type: entity-button
thanks for the help
3 Likes
Does your automation contain conditions? And if so, do you want this button to run the automation’s actions only if those conditions are true? If so you should change it to:
tap_action:
action: call-service
service: automation.trigger
service_data:
entity_id: automation.porton_test
skip_condition: false
For those that might not know, the skip_condition
parameter is new since 0.104.
1 Like
Yes, because that I switch to use a script, I don´t know that…
daps09
(Dapinder)
July 8, 2021, 1:04pm
12
did you put it in configuration file or UI dashboard editor?