I have created a motion activated flow that turns lights at different intensities and colors between two distinct time intervals (daytime and nightime). I also have an “override” input boolean in case I stay up later and don’t want the motion activation to trigger night mode when I need bright lights. I have a trigger node that is supposed to reset and fire whenever there is another motion within the time range.
Can anyone please help and look to see why
- Lights are not turning off?
- Trigger node is not restarting when motion occurs again within time period?
- Why does the trigger node not display the blue “count down” square above it when it is triggered? Only does this when I use an inject node.
- Is there a way to see the actual count down on the trigger node live? Would be great to see at what time it is activated again or not.
Very grateful for any help.
[{"id":"1774a3ef481e12f4","type":"server-state-changed","z":"fac981ff.52172","name":"Bedroom Motion","server":"","version":6,"outputs":2,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.bedroom_sensor_pir"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"on","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":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":120,"y":1960,"wires":[["ed447e8605016b80","0ae5fbb874dad586"],[]]},{"id":"ed447e8605016b80","type":"api-current-state","z":"fac981ff.52172","name":"Bedroom Light - Off?","server":"","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.bedroom_lamp","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"for":0,"forType":"num","forUnits":"minutes","x":560,"y":1900,"wires":[["dead99c34b13ddc7"],[]]},{"id":"0ae5fbb874dad586","type":"switch","z":"fac981ff.52172","name":"on/off","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":350,"y":1960,"wires":[["ed447e8605016b80","e9c18027b9352ec7"],["e9c18027b9352ec7"]]},{"id":"dead99c34b13ddc7","type":"api-current-state","z":"fac981ff.52172","name":"Override - Off?","server":"","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.override","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"for":0,"forType":"num","forUnits":"minutes","x":800,"y":1960,"wires":[["6ecbf828818eac2f"],["083231d63315635e","cf481aa02f308258"]]},{"id":"e9c18027b9352ec7","type":"trigger","z":"fac981ff.52172","name":"","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"15","extend":true,"overrideDelay":false,"units":"min","reset":"on","bytopic":"all","topic":"topic","outputs":1,"x":550,"y":2020,"wires":[["006939d19240e6eb"]]},{"id":"6ecbf828818eac2f","type":"time-range-switch","z":"fac981ff.52172","name":"After/Before Bed","lat":"","lon":"","startTime":"22:30","endTime":"dawn","startOffset":"","endOffset":"-10","x":1010,"y":1860,"wires":[["5ee56d5e5bc18689"],["083231d63315635e"]]},{"id":"083231d63315635e","type":"api-call-service","z":"fac981ff.52172","name":"Bedroom On - Daytime","server":"","version":7,"debugenabled":false,"action":"scene.turn_on","floorId":[],"areaId":[],"deviceId":[],"entityId":["scene.main_bedroom_lights_concentrate"],"labelId":[],"data":"{\"transition\":2}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","blockInputOverrides":false,"domain":"scene","service":"turn_on","x":1350,"y":1900,"wires":[[]]},{"id":"cf481aa02f308258","type":"trigger","z":"fac981ff.52172","name":"","op1":"","op2":"","op1type":"nul","op2type":"pay","duration":"1","extend":false,"overrideDelay":false,"units":"hr","reset":"off","bytopic":"all","topic":"topic","outputs":1,"x":1310,"y":1960,"wires":[["30f9272bab9925f0"]]},{"id":"006939d19240e6eb","type":"api-call-service","z":"fac981ff.52172","name":"Bedroom Off","server":"","version":7,"debugenabled":false,"action":"light.turn_off","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_bedroom_lights"],"labelId":[],"data":"{\"transition\":3}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","blockInputOverrides":false,"domain":"light","service":"turn_off","x":1190,"y":2020,"wires":[[]]},{"id":"5ee56d5e5bc18689","type":"api-call-service","z":"fac981ff.52172","name":"Bedroom On - Nighttime","server":"","version":7,"debugenabled":false,"action":"scene.turn_on","floorId":[],"areaId":[],"deviceId":[],"entityId":["scene.bedroom_lights_nightime"],"labelId":[],"data":"{\"transition\":3}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","blockInputOverrides":false,"domain":"scene","service":"turn_on","x":1350,"y":1840,"wires":[[]]},{"id":"30f9272bab9925f0","type":"api-call-service","z":"fac981ff.52172","name":"Control Mode Reset","server":"","version":7,"debugenabled":false,"action":"input_boolean.turn_off","floorId":[],"areaId":[],"deviceId":[],"entityId":["input_boolean.override"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"input_boolean","service":"turn_off","x":1520,"y":1960,"wires":[[]]}]