Closed zylxpl closed 1 year ago
change array keys to periods instead of []. params.events.0.id
Thank you, works like a charm. Any interest for it to be push to master (i can also add int, double etc to normal shelly blueprints)? :
name: Shelly Plus 2PM MQTT
service: Shelly
event_type: mqtt
mqtt_topic_format: +/events/rpc
buttons:
- x: 110
y: 123
width: 66
height: 66
conditions:
- key: params.events.0.id
value: 0
actions:
- title: init
conditions:
- key: params.events.0.event
value: btn_down
- title: press
conditions:
- key: params.events.0.event
value: single_push
- title: press 2x
conditions:
- key: params.events.0.event
value: double_push
- title: press 3x
conditions:
- key: params.events.0.event
value: triple_push
- title: hold
conditions:
- key: params.events.0.event
value: long_push
- title: hold (released)
conditions:
- key: params.events.0.event
value: btn_up
- x: 110
y: 241
width: 66
height: 66
conditions:
- key: params.events.0.id
value: 1
actions:
- title: init
conditions:
- key: params.events.0.event
value: btn_down
- title: press
conditions:
- key: params.events.0.event
value: single_push
- title: press 2x
conditions:
- key: params.events.0.event
value: double_push
- title: press 3x
conditions:
- key: params.events.0.event
value: triple_push
- title: hold
conditions:
- key: params.events.0.event
value: long_push
- title: hold (released)
conditions:
- key: params.events.0.event
value: btn_up
Cool glad it worked out. Feel free to PR if you wish. Adding an init to the other shelly's sounds fine although it will cause a misconfig for users who are already using that blueprint so it's not always ideal to update a blueprint once it's published from a previous release.
Hello, trying to create blueprint for Shelly 2 PM connected via mqtt. However, values i need to use are in the [...] array in json payload, and it is not working. Sample mqtt payload:
and my blueprint: