I’ve tried this allready yesterday, unfortunately I didn’t realized that I had changed the script aliases and not the enitiy-id, which is used to call a script… so, the if else structure worked fine, but no script was found an executed…
Hi @wema
Can you explain me how this works?
What is the difference between this script (on what event is it started) and on the other 4 scripts (kurz1,2,3,long) ?
I understand that the button has 4 possible triggers, therefor you use 4 different scripts.
But what in what case is the script ‘script.turn_on’ used ?
with conditions there is a very nice way to do this in the gui. and it works great!
create a new automation in the gui.
for trigger choose MQTT and set the topic as: shellies/*yourshellytopic*/input_event/0
leave payload empty.
and under actions select “choose” and then for condition “template” and use: {{ trigger.payload_json.event == "S" }} (or SS,SSS,L)
then you can add actions or add another options with other template conditions.