I have Aqara motion sensors and have set up lights to turn on the lights when motion is detected, and turns off after 5 mins during certain hours.
I am looking to inculcate the switch override function wherein if the switch is manually turned on the timer turns off and the lights will turn on until swtich is turned off.
There are several such flows that were posted from last year but not sure if something has changed, cos none of those flows work for me.
Can someone pls add that function for me.
Here is the export of my flow.
[{"id":"8088a541d8eb3fb5","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"0107744f99c3b390","type":"server-state-changed","z":"8088a541d8eb3fb5","name":"Master Bathroom Motion","server":"2736f9e1.3a6d56","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.lumi_lumi_sensor_motion_aq2_ias_zone","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"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":130,"y":60,"wires":[["dac1e8f17f188949"]]},{"id":"dac1e8f17f188949","type":"time-range-switch","z":"8088a541d8eb3fb5","name":"","lat":"29.714266","lon":"-95.837051","startTime":"18:00","endTime":"8:30","startOffset":0,"endOffset":0,"x":350,"y":100,"wires":[["05c7dc10791352b8","45ae1a033159c52b"],[]]},{"id":"05c7dc10791352b8","type":"api-call-service","z":"8088a541d8eb3fb5","name":"Turn the light on","server":"2736f9e1.3a6d56","version":4,"debugenabled":false,"domain":"switch","service":"turn_on","target":{"areaId":[],"deviceId":[],"entityId":["switch.master_bathroom_lights"]},"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":620,"y":40,"wires":[[]]},{"id":"45ae1a033159c52b","type":"stoptimer","z":"8088a541d8eb3fb5","duration":"5","units":"Minute","payloadtype":"num","payloadval":"0","name":"","x":640,"y":100,"wires":[["8f1aaf8fd7bb8ae7"],[]]},{"id":"46a28cdfdb86614e","type":"api-call-service","z":"8088a541d8eb3fb5","name":"Turn the light off","server":"2736f9e1.3a6d56","version":4,"debugenabled":false,"domain":"switch","service":"turn_off","target":{"areaId":[],"deviceId":[],"entityId":["switch.master_bathroom_lights"]},"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":640,"y":300,"wires":[[]]},{"id":"ab273dc70cad7ef0","type":"switch","z":"8088a541d8eb3fb5","name":"motion detector still on? ","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":650,"y":220,"wires":[["45ae1a033159c52b"],["46a28cdfdb86614e"]]},{"id":"8f1aaf8fd7bb8ae7","type":"api-current-state","z":"8088a541d8eb3fb5","name":"motion sensor current status","server":"2736f9e1.3a6d56","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"binary_sensor.lumi_lumi_sensor_motion_aq2_ias_zone","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","x":880,"y":80,"wires":[["ab273dc70cad7ef0"]]},{"id":"2736f9e1.3a6d56","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30}]
Also if you can replace the time based function to a sunset based flow or use big timer?
It be of great help. Thanks in advance.