I have the following code to turn a light on when motion is detected and the light level is low and turn off after 10 minutes. I was using the using the Stop Timer but with the new Node-Red upgrade I had to switch to the Trigger. The Trigger dosent always reset itself, so when the light turns off and then it gets triggered again it will turn the light off within a minute. Any ideas as to why its not working correctly?
[{"id":"38bba1ec.290e0e","type":"api-call-service","z":"40023292.3ec94c","name":"Turn On Jeff Light","server":"4a63ddf5.8fd424","version":5,"debugenabled":true,"domain":"switch","service":"turn_on","areaId":,"deviceId":,"entityId":["switch.jeff_light_socket_1"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":,"queue":"none","x":910,"y":240,"wires":[]},{"id":"62d37c09.668a14","type":"api-call-service","z":"40023292.3ec94c","name":"Turn On Turtle Light","server":"4a63ddf5.8fd424","version":5,"debugenabled":true,"domain":"light","service":"turn_on","areaId":,"deviceId":,"entityId":["light.turtle_light"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":,"queue":"none","x":920,"y":300,"wires":[]},{"id":"dc99f138.5e14f","type":"api-call-service","z":"40023292.3ec94c","name":"Turn Off Turtle Light","server":"4a63ddf5.8fd424","version":5,"debugenabled":true,"domain":"light","service":"turn_off","areaId":,"deviceId":,"entityId":["light.turtle_light"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":,"queue":"none","x":920,"y":420,"wires":[]},{"id":"44b4db6.a677324","type":"api-call-service","z":"40023292.3ec94c","name":"Turn Off Jeff Light","server":"456659de.370498","version":5,"debugenabled":true,"domain":"switch","service":"turn_off","areaId":,"deviceId":,"entityId":["switch.jeff_light_socket_1"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":,"queue":"none","x":910,"y":360,"wires":[]},{"id":"e540e0dc.62ae9","type":"server-state-changed","z":"40023292.3ec94c","name":"Livingroom Motion Detection","server":"4a63ddf5.8fd424","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.livingroom_4_in_1_sensor_7","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":140,"y":40,"wires":[["b9171d40.e80e8"],["2544066e.4aee1a"]]},{"id":"2544066e.4aee1a","type":"time-range-switch","z":"40023292.3ec94c","name":"","lat":"39.325159","lon":"-88.127590","startTime":"sunset","endTime":"01:30","startOffset":"-62","endOffset":0,"x":140,"y":200,"wires":[,["e75d053cbca923bc"]]},{"id":"b9171d40.e80e8","type":"api-current-state","z":"40023292.3ec94c","name":"","server":"4a63ddf5.8fd424","version":3,"outputs":2,"halt_if":"40","halt_if_type":"num","halt_if_compare":"lte","entity_id":"sensor.livingroom_light_sen_9","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":510,"y":40,"wires":[["feec1db9c280fe67"],]},{"id":"8afc214d0a4de52e","type":"switch","z":"40023292.3ec94c","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"ON","vt":"str"},{"t":"eq","v":"OFF","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":490,"y":380,"wires":[["38bba1ec.290e0e","62d37c09.668a14"],["44b4db6.a677324","dc99f138.5e14f"]]},{"id":"e75d053cbca923bc","type":"trigger","z":"40023292.3ec94c","name":"","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"10","extend":false,"overrideDelay":false,"units":"min","reset":"reset","bytopic":"all","topic":"topic","outputs":1,"x":390,"y":200,"wires":[["29ee63fc48bd449e"]]},{"id":"29ee63fc48bd449e","type":"api-current-state","z":"40023292.3ec94c","name":"Jeff Light On","server":"4a63ddf5.8fd424","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.jeff_light_socket_1","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entity"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":590,"y":200,"wires":[["44b4db6.a677324"],]},{"id":"feec1db9c280fe67","type":"api-current-state","z":"40023292.3ec94c","name":"Jeff Light Off","server":"4a63ddf5.8fd424","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.jeff_light_socket_1","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":590,"y":120,"wires":[["38bba1ec.290e0e"],]},{"id":"4a63ddf5.8fd424","type":"server","name":"Home Assistant","version":4,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m"},{"id":"456659de.370498","type":"server","name":"Home Assistant","version":4,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m"}]