So I have this code
[{"id":"f643f713.6dcbf8","type":"switch","z":"63b888ad.567028","name":"Which Door Sensor?","property":"payload.entity_id","propertyType":"msg","rules":[{"t":"eq","v":"sensor.back_door_status","vt":"str"},{"t":"eq","v":"sensor.inside_garage_door_contact","vt":"str"},{"t":"eq","v":"sensor.freezer_door","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":360,"y":340,"wires":[["31b8da80.8406b6","db32b1e2.c375f"],[],[]],"outputLabels":["Back Door","Inside Garage Door","Freezer Door"]},{"id":"db32b1e2.c375f","type":"debug","z":"63b888ad.567028","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":610,"y":540,"wires":[]},{"id":"4acf8627.5a4308","type":"switch","z":"63b888ad.567028","name":"","property":"payload.event_type","propertyType":"msg","rules":[{"t":"cont","v":"state_changed","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":170,"y":340,"wires":[["f643f713.6dcbf8"]]},{"id":"31b8da80.8406b6","type":"switch","z":"63b888ad.567028","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"open","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":510,"y":220,"wires":[["db32b1e2.c375f"]]}]
I’m trying to catch the state change of when the door opens/closes so that I can set the timer for a 5 min delay and then if the door is closed prior to that 5 mins it resets the timer. That part seems simple enough but I can’t get the payload to go to that switch that contains the open/closed status of the sensor. I’ve tried msg.playload.new_state as well as just msg.payload but nothing is thrown out into the debug node.
EDIT: YES!!! Figured it out you need to capture this payload
payload.event.new_state.state