Hi guys, I have been messing with this for a while but just can’t figure it out. What I have is a sliding door contact that when opens turns on LED lights on the porch during certain hours of the night and turns off after set time (25 seconds) in this example. That part works great.
If I am out there on the porch and I turn on the LED lights while entertaining my guest, and the sliding door opens, I don’t want it to trigger the timer, but instead do nothing since the light was already on. How can I get the flow to cancel if the LED lights are already on?
I put conditions in the trigger-state node but that didn’t seem to work. What happens is if the lights are already on, and the door opens, the lights flash quickly and turns off 25 seconds later. Just want the lights to remain on unless the lights were off.
[{"id":"2c4ea8fe.401718","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"304e7974.ccbde6","type":"time-range-switch","z":"2c4ea8fe.401718","name":"Hours Between 7pm to 6:30am","lat":"","lon":"","startTime":"16:00","endTime":"06:30","startOffset":0,"endOffset":0,"x":470,"y":80,"wires":[["885318ec.a4d0d8"],[]]},{"id":"e542fad2.7d27a8","type":"stoptimer","z":"2c4ea8fe.401718","duration":"25","units":"Second","payloadtype":"num","payloadval":"0","name":"","x":570,"y":340,"wires":[["ef4e817b.facd5"],[]]},{"id":"ef4e817b.facd5","type":"api-call-service","z":"2c4ea8fe.401718","name":"Porch LED Lights OFF","server":"6821cdda.fbbcd4","version":3,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.801068338cce4ec36777","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":440,"y":480,"wires":[[]]},{"id":"885318ec.a4d0d8","type":"api-call-service","z":"2c4ea8fe.401718","name":"Porch LED Lights ON","server":"6821cdda.fbbcd4","version":3,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.801068338cce4ec36777","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":480,"y":200,"wires":[["e542fad2.7d27a8"]]},{"id":"685b974d.d7aae8","type":"trigger-state","z":"2c4ea8fe.401718","name":"Sliding Door Open","server":"6821cdda.fbbcd4","version":0,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"binary_sensor.sliding_door_contact","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"targetType":"this_entity","targetValue":"","propertyType":"current_state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"on","propertyValue":"new_state.state"},{"targetType":"entity_id","targetValue":"light.801068338cce4ec36777","propertyType":"current_state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"off","propertyValue":"new_state.state"}],"outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":150,"y":140,"wires":[["304e7974.ccbde6"],[]]},{"id":"6821cdda.fbbcd4","type":"server","name":"Home Assistant","version":1,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]