For what it’s worth, my automation, the “meta” is a fake motion sensor which is based off two door sensors and one motion, presented as a single element which is clear only if all three are clear.
[{"id":"edac509289975c49","type":"subflow","name":"Automation & CoolDown","info":"","category":"","in":[{"x":40,"y":40,"wires":[{"id":"0c3887d5df7bd05a"}]}],"out":[{"x":360,"y":220,"wires":[{"id":"935e9bcb0d45fc20","port":0}]}],"env":[],"meta":{},"color":"#DDAA99"},{"id":"ab6df0564cd2118d","type":"api-current-state","z":"edac509289975c49","name":"Automation Check","server":"116501d2.cc5c6e","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.enable_automations","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"PIRState","valueType":"flow"},{"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":210,"y":100,"wires":[["111d3f25773dfd82"],[]]},{"id":"111d3f25773dfd82","type":"api-current-state","z":"edac509289975c49","name":"Cooldown is off","server":"116501d2.cc5c6e","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.conservatory_switch_cooldown","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"PIRState","valueType":"flow"},{"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":200,"y":160,"wires":[["935e9bcb0d45fc20"],[]]},{"id":"0c3887d5df7bd05a","type":"function","z":"edac509289975c49","name":"Store PIR State","func":"flow.set(\"SavedState\", msg.payload)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":200,"y":40,"wires":[["ab6df0564cd2118d"]]},{"id":"935e9bcb0d45fc20","type":"change","z":"edac509289975c49","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"SavedState","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":200,"y":220,"wires":[[]]},{"id":"239445065111a8ca","type":"server-state-changed","z":"1aeedfc25043cc75","name":"Conservatory Human \"Off\"","server":"116501d2.cc5c6e","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"light.conservatory","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":150,"y":1200,"wires":[["845a03b627afe8e1"]]},{"id":"80e4f3d3cf0c0051","type":"api-call-service","z":"1aeedfc25043cc75","name":"Cooldown On","server":"116501d2.cc5c6e","version":5,"debugenabled":false,"domain":"input_boolean","service":"turn_on","areaId":[],"deviceId":[],"entityId":["input_boolean.conservatory_switch_cooldown"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":500,"y":1200,"wires":[["8228952988b30a44","b472b0ec82ac1069"]]},{"id":"c127c2d4eb5cce0f","type":"api-call-service","z":"1aeedfc25043cc75","name":"Cooldown Off","server":"116501d2.cc5c6e","version":5,"debugenabled":false,"domain":"input_boolean","service":"turn_off","areaId":[],"deviceId":[],"entityId":["input_boolean.conservatory_switch_cooldown"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":660,"y":1260,"wires":[[]]},{"id":"845a03b627afe8e1","type":"switch","z":"1aeedfc25043cc75","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":350,"y":1200,"wires":[[],["80e4f3d3cf0c0051"]]},{"id":"8228952988b30a44","type":"delay","z":"1aeedfc25043cc75","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":480,"y":1260,"wires":[["c127c2d4eb5cce0f"]]},{"id":"2949c358d43e9f5d","type":"switch","z":"1aeedfc25043cc75","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":190,"y":1040,"wires":[["5a394cd64209270e","aaed1c9d641442c7"],["408d25f132382913"]]},{"id":"09045881a632b4b2","type":"api-current-state","z":"1aeedfc25043cc75","name":"Switch must be off","server":"116501d2.cc5c6e","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.sonoff_zbminil2_switch","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":690,"y":960,"wires":[["9125d57672677dc7"],[]]},{"id":"5a394cd64209270e","type":"api-current-state","z":"1aeedfc25043cc75","name":"Is daylight OK?","server":"116501d2.cc5c6e","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.lux_tracker","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":680,"y":900,"wires":[["09045881a632b4b2"],[]]},{"id":"9125d57672677dc7","type":"api-call-service","z":"1aeedfc25043cc75","name":"TriggeredbyMotion True","server":"116501d2.cc5c6e","version":5,"debugenabled":false,"domain":"input_boolean","service":"turn_on","areaId":[],"deviceId":[],"entityId":["input_boolean.conservatorylight_triggered_by_motion"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":970,"y":900,"wires":[["95f3cb08457041eb"]]},{"id":"95f3cb08457041eb","type":"api-call-service","z":"1aeedfc25043cc75","name":"Lights on","server":"116501d2.cc5c6e","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.conservatory"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":940,"y":960,"wires":[[]]},{"id":"9c9b16cbc7d76bf4","type":"api-call-service","z":"1aeedfc25043cc75","name":"Lights off","server":"116501d2.cc5c6e","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["light.conservatory"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1100,"y":1260,"wires":[[]]},{"id":"b472b0ec82ac1069","type":"api-call-service","z":"1aeedfc25043cc75","name":"TriggeredbyMotion False","server":"116501d2.cc5c6e","version":5,"debugenabled":false,"domain":"input_boolean","service":"turn_off","areaId":[],"deviceId":[],"entityId":["input_boolean.conservatorylight_triggered_by_motion"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1150,"y":1200,"wires":[["9c9b16cbc7d76bf4"]]},{"id":"e5bf372e7681fc51","type":"api-current-state","z":"1aeedfc25043cc75","name":"TriggeredbyMotion ON","server":"116501d2.cc5c6e","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.conservatorylight_triggered_by_motion","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":1140,"y":1080,"wires":[["b472b0ec82ac1069"],[]]},{"id":"8b7ef1b5c0a608c9","type":"comment","z":"1aeedfc25043cc75","name":"Conservatory Lighting","info":"","x":140,"y":820,"wires":[]},{"id":"3e6256a2e9d86e5d","type":"server-state-changed","z":"1aeedfc25043cc75","name":"Conservatory Meta","server":"116501d2.cc5c6e","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.conservatory_motion_meta","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":860,"wires":[["8b9dc361b7a4db4a"]]},{"id":"8b9dc361b7a4db4a","type":"subflow:edac509289975c49","z":"1aeedfc25043cc75","name":"Trigger Check","x":340,"y":880,"wires":[["2949c358d43e9f5d"]]},{"id":"6f9468245bf18ff1","type":"api-current-state","z":"1aeedfc25043cc75","name":"Conservatory Meta","server":"116501d2.cc5c6e","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.conservatory_motion_meta","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":890,"y":1080,"wires":[[],["e5bf372e7681fc51"]]},{"id":"aaed1c9d641442c7","type":"change","z":"1aeedfc25043cc75","name":"STOP","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":1040,"wires":[["959549ea1d5a6ee7"]]},{"id":"90f236d77b660d02","type":"change","z":"1aeedfc25043cc75","name":"START","rules":[{"t":"set","p":"payload","pt":"msg","to":"10","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":1100,"wires":[["959549ea1d5a6ee7"]]},{"id":"959549ea1d5a6ee7","type":"countdown","z":"1aeedfc25043cc75","name":"","topic":"","payloadTimerStart":"true","payloadTimerStartType":"bool","payloadTimerStop":"false","payloadTimerStopType":"bool","timer":"180","resetWhileRunning":false,"setTimeToNewWhileRunning":true,"startCountdownOnControlMessage":false,"minuteCounter":false,"x":530,"y":1040,"wires":[["5b9c32a68f335a07"],["cd527a788f250c63"]]},{"id":"cd527a788f250c63","type":"change","z":"1aeedfc25043cc75","d":true,"name":"Remap","rules":[{"t":"change","p":"payload","pt":"msg","from":"^(\\d*)\\ sec$","fromt":"re","to":"$1","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"$number(payload)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":680,"y":1140,"wires":[["7a627fa592b875eb"]]},{"id":"5b9c32a68f335a07","type":"switch","z":"1aeedfc25043cc75","name":"","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":730,"y":1080,"wires":[[],["6f9468245bf18ff1"]]},{"id":"7a627fa592b875eb","type":"ha-number","z":"1aeedfc25043cc75","name":"light_timer_conservatory","version":1,"debugenabled":false,"inputs":1,"outputs":1,"entityConfig":"7451c6ec963b0dd5","mode":"set","value":"payload","valueType":"msg","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"value"},{"property":"previousValue","propertyType":"msg","value":"","valueType":"previousValue"}],"x":870,"y":1140,"wires":[[]]},{"id":"408d25f132382913","type":"api-current-state","z":"1aeedfc25043cc75","name":"Light must be on","server":"116501d2.cc5c6e","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.conservatory","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":150,"y":1100,"wires":[["90f236d77b660d02"],[]]},{"id":"a87e87d731365404","type":"server-state-changed","z":"1aeedfc25043cc75","name":"Conservatory Motion","server":"116501d2.cc5c6e","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.conservatory","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":920,"wires":[["8b9dc361b7a4db4a"]]},{"id":"116501d2.cc5c6e","type":"server","name":"Home Assistant","addon":true},{"id":"7451c6ec963b0dd5","type":"ha-entity-config","server":"116501d2.cc5c6e","deviceConfig":"","name":"light_timer_conservatory","version":"6","entityType":"number","haConfig":[{"property":"name","value":"light_timer_conservatory"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":""},{"property":"unit_of_measurement","value":""},{"property":"min_value","value":""},{"property":"max_value","value":""},{"property":"step_value","value":""},{"property":"mode","value":"auto"}],"resend":false,"debugEnabled":false}]