Light timer doesn't seem to work

I have a flow that is to trigger RGB lights on for different durations and colors base off of time of day. However, regardless of method of trigger (motion or mmWave), the lights will not stay on for the full 10 minutes, even if there's a timer prompting for input response every second.

[{"id":"e1f7957f7ac44993","type":"tab","label":"Flow 6","disabled":false,"info":"","env":[]},{"id":"0b30fa50fdf02e4a","type":"api-call-service","z":"e1f7957f7ac44993","name":"Both counters in blue","server":"d0c16111.97688","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.long_counter","light.short_counter_light"],"data":"{\"rgb_color\":[0,0,255]}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":920,"y":280,"wires":[["1e58750491b19b08"]]},{"id":"95f42ea4a212471e","type":"api-call-service","z":"e1f7957f7ac44993","name":"Both counters in white","server":"d0c16111.97688","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.long_counter","light.short_counter_light"],"data":"{\"rgb_color\":[255,255,255]}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":240,"wires":[["f22d40730ccf7cbc"]]},{"id":"60a9910cc29bbe9d","type":"time-range-switch","z":"e1f7957f7ac44993","name":"06:30 -- 21:00","lat":"34.95964040579477","lon":"-78.96775595553902","startTime":"06:30","endTime":"21:00","startOffset":0,"endOffset":"","x":460,"y":220,"wires":[["95f42ea4a212471e"],["d1a61e466dcc0111"]]},{"id":"b20c3a67a85cca62","type":"time-range-switch","z":"e1f7957f7ac44993","name":"21:00 -- Dawn +20","lat":"34.95964040579477","lon":"-78.96775595553902","startTime":"22:00","endTime":"sunrise","startOffset":0,"endOffset":"+20","x":910,"y":360,"wires":[["aad9c8c7fd3bdc2b"],[]]},{"id":"aad9c8c7fd3bdc2b","type":"api-call-service","z":"e1f7957f7ac44993","name":"Short Counter Light Blue","server":"d0c16111.97688","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.short_counter_light"],"data":"{\"rgb_color\":[0,0,255]}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1150,"y":360,"wires":[["c89937a94374ec94"]]},{"id":"f22d40730ccf7cbc","type":"stoptimer-varidelay","z":"e1f7957f7ac44993","duration":"10","durationType":"num","units":"Minute","payloadtype":"num","payloadval":"0","name":"","reporting":"last_minute_seconds","persist":false,"ignoretimerpass":false,"x":1360,"y":240,"wires":[["7ed1e660054ddf62"],[],[]]},{"id":"d1a61e466dcc0111","type":"time-range-switch","z":"e1f7957f7ac44993","name":"21:00 -- 22:00","lat":"34.95964040579477","lon":"-78.96775595553902","startTime":"21:00","endTime":"22:00","startOffset":0,"endOffset":"","x":680,"y":300,"wires":[["0b30fa50fdf02e4a"],["b20c3a67a85cca62"]]},{"id":"7eb0e8a0f33c3d24","type":"weekday","z":"e1f7957f7ac44993","name":"","sun":false,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":false,"x":120,"y":220,"wires":[["507c2ffa97ac46fe"],["e951e12a109d6c53"]]},{"id":"e951e12a109d6c53","type":"time-range-switch","z":"e1f7957f7ac44993","name":"07 -- 21:00","lat":"34.95964040579477","lon":"-78.96775595553902","startTime":"7:00","endTime":"21:00","startOffset":"","endOffset":"","x":270,"y":260,"wires":[["95f42ea4a212471e"],["d1a61e466dcc0111"]]},{"id":"c89937a94374ec94","type":"stoptimer-varidelay","z":"e1f7957f7ac44993","duration":"2","durationType":"num","units":"Minute","payloadtype":"num","payloadval":"0","name":"","reporting":"last_minute_seconds","persist":false,"ignoretimerpass":false,"x":1360,"y":320,"wires":[["7ed1e660054ddf62"],[],[]]},{"id":"f01786e75e93a56e","type":"inject","z":"e1f7957f7ac44993","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":40,"wires":[["b62c328233df5f19"]]},{"id":"8eb9f090418831b0","type":"api-call-service","z":"e1f7957f7ac44993","name":"Both counters in blue","server":"d0c16111.97688","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.long_counter","light.short_counter_light"],"data":"{\"rgb_color\":[0,0,255]}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":480,"y":180,"wires":[["f22d40730ccf7cbc"]]},{"id":"507c2ffa97ac46fe","type":"time-range-switch","z":"e1f7957f7ac44993","name":"06:00 -- 06:30","lat":"34.95964040579477","lon":"-78.96775595553902","startTime":"06:00","endTime":"06:30","startOffset":0,"endOffset":"","x":280,"y":180,"wires":[["8eb9f090418831b0"],["60a9910cc29bbe9d"]]},{"id":"b62c328233df5f19","type":"trigger-state","z":"e1f7957f7ac44993","name":"Kitchen Motion","server":"d0c16111.97688","version":2,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"binary_sensor.kitchen_motion_sensor","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"targetType":"this_entity","targetValue":"","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"on"}],"inputs":1,"outputs":2,"customoutputs":[],"outputinitially":true,"state_type":"str","enableInput":true,"x":240,"y":100,"wires":[["7eb0e8a0f33c3d24"],[]]},{"id":"1e58750491b19b08","type":"time-range-switch","z":"e1f7957f7ac44993","name":"21:00 -- 21:30","lat":"34.95964040579477","lon":"-78.96775595553902","startTime":"21:00","endTime":"21:30","startOffset":0,"endOffset":"","x":1120,"y":280,"wires":[["f22d40730ccf7cbc"],["c89937a94374ec94"]]},{"id":"7ed1e660054ddf62","type":"api-call-service","z":"e1f7957f7ac44993","name":"Lights out","server":"d0c16111.97688","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["light.long_counter","light.short_counter_light","light.sink_light"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1520,"y":280,"wires":[[]]},{"id":"d0c16111.97688","type":"server","name":"Home Assistant","version":4,"addon":false,"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"}]

Here's the history showing where the lights turned off whilst there was triggered input.|

I used the initial, timed input node in an attempt to force the flow to refresh and I am certainly willing to take on advice.

Finally, my desired end-state is for timer to continue to reset with detected motion (regardless of sensor type) and the lights to stay on.

Cheers!!

Bueller? Bueller??

Not all Node-red users use Home Assistant.

Just for your information, this is what happens when I import your flow into a typical Node-red setup.

I suspect that you might get a better informed answer from a Home Assistant forum.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.