[{"id":"773a8406e7e711eb","type":"server-state-changed","z":"894a6b3077af9604","name":"","server":"","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.motion","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":344,"y":1472,"wires":[["ece658dcd1b8942a"],[]]},{"id":"ece658dcd1b8942a","type":"api-current-state","z":"894a6b3077af9604","name":"","server":"","version":3,"outputs":2,"halt_if":"100","halt_if_type":"num","halt_if_compare":"lt","entity_id":"sensor.lux","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":590,"y":1472,"wires":[["97897a529c58b009","073cfbf3eaa7e0ae"],["027e470bdee51a0d"]]},{"id":"97897a529c58b009","type":"time-range-switch","z":"894a6b3077af9604","name":"","lat":"","lon":"","startTime":"sunsetStart","endTime":"dusk","startOffset":0,"endOffset":0,"x":822,"y":1472,"wires":[["578373b26f214530"],[]]},{"id":"073cfbf3eaa7e0ae","type":"time-range-switch","z":"894a6b3077af9604","name":"","lat":"","lon":"","startTime":"sunsetStart","endTime":"dusk","startOffset":0,"endOffset":0,"x":822,"y":1424,"wires":[["eb435f39d2e8d652"],[]]},{"id":"eb435f39d2e8d652","type":"api-call-service","z":"894a6b3077af9604","name":"","server":"","version":3,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.light","data":"{\"brightness_pct\": 80}","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1194,"y":1424,"wires":[[]]},{"id":"578373b26f214530","type":"change","z":"894a6b3077af9604","name":"set brightness","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"data\": {\"brightness_pct\": 50}}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":1008,"y":1472,"wires":[["eb435f39d2e8d652"]]},{"id":"027e470bdee51a0d","type":"ha-wait-until","z":"894a6b3077af9604","name":"","server":"","version":0,"outputs":2,"entityId":"light.light","entityIdFilterType":"exact","property":"state","comparator":"is","value":"off","valueType":"str","timeout":"60","timeoutType":"num","timeoutUnits":"seconds","entityLocation":"data","entityLocationType":"none","checkCurrentState":true,"blockInputOverrides":true,"x":796,"y":1520,"wires":[[],["f11f80c20ea9476e"]]},{"id":"f11f80c20ea9476e","type":"api-call-service","z":"894a6b3077af9604","name":"","server":"","version":3,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.light","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1018,"y":1520,"wires":[[]]}]