Hello all,
Could I get some assistance here? The below automation fails to run, in debug it gets “choose: no action taken”. Of course if I add a default it runs default. I used my value template as a trigger and that seems to work, it just doesnt work under action choose. I’m hoping what I’m attempting is supposed to work as I dont want to create 9 different automations for a single dimmer.
These are my MQTT publish from my tasmotized dimmer switch.
02:52:12.077 MQT: stat/MasterBedroom3SW/RESULT = {“Button2”:{“Action”:“SINGLE”}}
02:52:18.529 MQT: stat/MasterBedroom3SW/RESULT = {“Button2”:{“Action”:“DOUBLE”}}
02:52:21.404 MQT: stat/MasterBedroom3SW/RESULT = {“Button2”:{“Action”:“HOLD”}}
- id: 3cf538a6-b5dc-436e-8d52-9923ed13f369
alias: Master Bedroom 3SW Button2
trigger:
- platform: mqtt
topic: "stat/MasterBedroom3SW/RESULT"
action:
- choose:
- conditions:
- condition: template
value_template: "{{trigger.value_json.Button2.Action == 'SINGLE'}}"
sequence:
- service: notify.mobile_app_huascars_iphone
data:
title: "MasterBedroom3SW"
message: 'BUTTON2 SINGLE PRESS'
- conditions:
- condition: template
value_template: "{{trigger.value_json.Button2.Action == 'DOUBLE'}}"
sequence:
- service: notify.mobile_app_huascars_iphone
data:
title: "MasterBedroom3SW"
message: 'BUTTON2 DOUBLE PRESS'
- conditions:
- condition: template
value_template: "{{trigger.value_json.Button2.Action == 'HOLD'}}"
sequence:
- service: notify.mobile_app_huascars_iphone
data:
title: "MasterBedroom3SW"
message: 'BUTTON2 HOLD PRESS'
Thanks all