Via MQTT there are two outputs/messages from my Sonoff (Tasmota) Dual R3:
tele/Fietsen/STATE = {"Time":"2022-09-18T11:21:07","Uptime":"0T18:50:17","UptimeSec":67817,"Heap":151,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":14,"Berry":{"HeapUsed":3,"Objects":40},"POWER1":"ON","POWER2":"OFF","Wifi":{"AP":1,"SSId":"TIS","BSSId":"2C:91:AB:D4:57:79","Channel":6,"Mode":"11n","RSSI":88,"Signal":-56,"LinkCount":14,"Downtime":"0T00:02:55"}}
and
tele/Fietsen/SENSOR = {"Time":"2022-09-18T11:21:08","Switch1":"ON","Switch2":"ON","ENERGY":{"TotalStartTime":"2022-04-17T10:26:15","Total":13.403,"Yesterday":0.090,"Today":0.000,"Period":[ 0, 0],"Power":[ 0, 0],"ApparentPower":[ 0, 0],"ReactivePower":[ 0, 0],"Factor":[0.00,0.00],"Voltage": 0,"Current":[0.000,0.000]},"ESP32":{"Temperature":57.2},"TempUnit":"C"}
When payload.ENERGY.Current[0] < 0.1 and payload.POWER1 = ON the text must be generated and displayed.
Unfortunately I can't do this, can someone tell me how to do this?
This is my flow so far:
[{"id":"a3b360bc9233ce8f","type":"tab","label":"NR Forum","disabled":false,"info":"","env":[]},{"id":"47f83ff477748825","type":"switch","z":"a3b360bc9233ce8f","name":"1 ON?","property":"payload.Switch2","propertyType":"msg","rules":[{"t":"eq","v":"ON","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":390,"y":100,"wires":[["1b35cf0f6baaa7df"]]},{"id":"1b35cf0f6baaa7df","type":"switch","z":"a3b360bc9233ce8f","name":"< 100 watt?","property":"payload.ENERGY.Current[1]","propertyType":"msg","rules":[{"t":"lt","v":"0.100","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":530,"y":100,"wires":[["639c130714546083"]]},{"id":"639c130714546083","type":"change","z":"a3b360bc9233ce8f","name":"Text","rules":[{"t":"set","p":"payload","pt":"msg","to":"Current < 0.100 and Power ON","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":100,"wires":[["ec3b2d98358287e7"]]},{"id":"263716800d132df3","type":"mqtt in","z":"a3b360bc9233ce8f","name":"tele/Fietsen/STATE","topic":"tele/Fietsen/STATE","qos":"2","datatype":"auto-detect","broker":"41cfb26be5b19e42","nl":false,"rap":true,"rh":0,"inputs":0,"x":130,"y":140,"wires":[[]]},{"id":"436f1b8b0c791370","type":"mqtt in","z":"a3b360bc9233ce8f","name":"tele/Fietsen/SENSOR","topic":"tele/Fietsen/SENSOR","qos":"2","datatype":"auto-detect","broker":"41cfb26be5b19e42","nl":false,"rap":true,"rh":0,"inputs":0,"x":140,"y":80,"wires":[[]]},{"id":"ec3b2d98358287e7","type":"debug","z":"a3b360bc9233ce8f","name":"Show result","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":810,"y":100,"wires":[]},{"id":"41cfb26be5b19e42","type":"mqtt-broker","name":"MQTT NAS-B","broker":"192.168.2.155","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""}]