Dear All,
i’m having an issue with Getting a switch to update from MQTT Topic. All the examples I tried are not using JSONPATH.
MQTT TOPIC and JSON:
icarus/sonoff2/stats {“Motion”:0,“Light”:1,“Minutes”:38,“Hours”:1,“Days”:0,“Reboots”:152,“Heap”:44896,“RSSI”:"-49"}
SWITCH:
Switch Sonoff2_Light01 “Hall Lights” {mqtt="<[Server01:icarus/sonoff2/stats:state:ON:1],<[Server01:icarus/sonoff2/stats:state:OFF:0]"}
I have tried various combinations of;
- JSONPATH($.Light)
- JSONPATH($.Light == 1)
Switch Sonoff2_Light01 “Hall Lights” {mqtt="<[Server01:icarus/sonoff2/stats:state:ON:JSONPATH($.Light)],<[Server01:icarus/sonoff2/stats:state:OFF:JSONPATH($.Light)]"}
Switch Sonoff2_Light01 “Hall Lights” {mqtt="<[Server01:icarus/sonoff2/stats:state:*:JSONPATH($.Light)]"}
Is this even possible?
Many Thanks