On motion, I have our kitchen lights turn on soffit lighting. That motion event triggers a 30 minute timer, where if no motion after that 30 minutes, they turn off. Otherwise, if there’s motion at any time, the 30 minute timer resets.
It’s the last part that I’m struggling with. Below is my flow code, would anyone be willing to take a peek at it and see what I am missing? I was hoping to accomplish it by having that “Is light on” node capturing the state of a light, but that’s not working either
It’s a real bummer with the WAF not having this work.
[{"id":"2c157019.38218","type":"server-state-changed","z":"e9f629c5.eedcc","name":"Kitchen Northeast Motion Sensor","server":"e204944a.31bc78","entityidfilter":"binary_sensor.kitchen_northeast_motion_sensor","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"x":198.5,"y":739.4000549316406,"wires":[["a29c6410.c5a2a8"]]},{"id":"a29c6410.c5a2a8","type":"switch","z":"e9f629c5.eedcc","name":"Motion or No Motion?","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":563.5,"y":739,"wires":[["d9f997f0.955948","827cd944.af6de"],["d9f997f0.955948"]]},{"id":"63890857.598d6","type":"api-call-service","z":"e9f629c5.eedcc","name":"Kitchen Lights Off","server":"e204944a.31bc78","service_domain":"light","service":"turn_off","data":"{\"entity_id\":\"light.caseta_kitchen_island, light.caseta_kitchen_north, light.caseta_kitchen_southeast, light.caseta_kitchen_southwest, light.caseta_kitchen_west\"}","mergecontext":"","output_location":"payload","output_location_type":"msg","x":1219.5,"y":794,"wires":[[]]},{"id":"5d18a48f.56f62c","type":"api-call-service","z":"e9f629c5.eedcc","name":"Kitchen Lights","server":"e204944a.31bc78","service_domain":"light","service":"turn_on","data":"{\"entity_id\":\"light.caseta_kitchen_island, light.caseta_kitchen_north, light.caseta_kitchen_southeast, light.caseta_kitchen_southwest, light.caseta_kitchen_west\",\"brightness_pct\":35}","mergecontext":"","output_location":"payload","output_location_type":"msg","x":1210.5,"y":674.4999389648438,"wires":[[]]},{"id":"d9f997f0.955948","type":"stoptimer","z":"e9f629c5.eedcc","duration":"30","units":"Minute","payloadtype":"num","payloadval":"0","name":"30 Minute Timer","x":932.2000122070312,"y":790.2000122070312,"wires":[["63890857.598d6"],[]]},{"id":"827cd944.af6de","type":"api-current-state","z":"e9f629c5.eedcc","name":"Already On?","server":"e204944a.31bc78","outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":true,"entity_id":"light.caseta_kitchen_island","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":896.11669921875,"y":669.449951171875,"wires":[["5d18a48f.56f62c","d4061411.a0b21"],[]]},{"id":"d4061411.a0b21","type":"debug","z":"e9f629c5.eedcc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1145.11669921875,"y":542.8499755859375,"wires":[]},{"id":"e204944a.31bc78","type":"server","z":"","name":"Home Assistant","legacy":false,"hassio":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true}]