Keep entity on for at least a minute

Hi Everyone,

I want to shut down my accesspoint in the garden if no one is there. For this I am checking my garden door and my motion sensor in the garden. If both are off, the accesspoint should be shut down. But still I want the accesspoint to be on at least 5 minutes in order to avoid multiple on/off triggers. Any change suggestions on my flow?

[{"id":"43fbe4aee5f42f1f","type":"tab","label":"Accesspoint Steuerung","disabled":false,"info":"","env":[]},{"id":"d747cb7918bc5ac1","type":"server-state-changed","z":"43fbe4aee5f42f1f","name":"Terrassentüre","server":"787d7ae2.456504","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.gf_lr_gardendoor2_state","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":110,"y":120,"wires":[["d5b94d21464ac3b1"]]},{"id":"6d0b69a3d2132909","type":"server-state-changed","z":"43fbe4aee5f42f1f","name":"Bewegung Terrasse","server":"787d7ae2.456504","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.g_mt_terrasse_motion","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":180,"wires":[["d5b94d21464ac3b1"]]},{"id":"f1b73ef3fbca1249","type":"api-current-state","z":"43fbe4aee5f42f1f","name":"Accesspoint Garten aus?","server":"787d7ae2.456504","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.none_g_ap_poe","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"on","valueType":"str"},{"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":790,"y":140,"wires":[["deedf0d53f2a59b7"],[]],"outputLabels":["aus","an"]},{"id":"d5b94d21464ac3b1","type":"api-current-state","z":"43fbe4aee5f42f1f","name":"Status Terrassentüre","server":"787d7ae2.456504","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"binary_sensor.gf_lr_gardendoor2_state","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":460,"y":120,"wires":[["f1b73ef3fbca1249"],["c1f853e24e96b9fd"]],"outputLabels":["geöffnet","geschlossen"]},{"id":"c1f853e24e96b9fd","type":"api-current-state","z":"43fbe4aee5f42f1f","name":"Status Bewegungsmelder","server":"787d7ae2.456504","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"binary_sensor.g_mt_terrasse_motion","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":470,"y":180,"wires":[["f1b73ef3fbca1249"],["1befc090e5b152a4"]],"outputLabels":["Bewegung","keine Bewegung"]},{"id":"deedf0d53f2a59b7","type":"api-call-service","z":"43fbe4aee5f42f1f","name":"Accesspoint einschalten","server":"787d7ae2.456504","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.g_ap_poe"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1090,"y":140,"wires":[[]]},{"id":"1befc090e5b152a4","type":"api-call-service","z":"43fbe4aee5f42f1f","name":"Accesspoint ausschalten","server":"787d7ae2.456504","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.g_ap_poe"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1090,"y":180,"wires":[[]]},{"id":"12d9c31d07344edd","type":"inject","z":"43fbe4aee5f42f1f","name":"manueller Trigger","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":120,"y":60,"wires":[["d5b94d21464ac3b1"]]},{"id":"787d7ae2.456504","type":"server","name":"Home Assistant","version":5,"addon":true,"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","enableGlobalContextStore":true}]

I hope this is not too late.

[{"id":"d747cb7918bc5ac1","type":"server-state-changed","z":"43fbe4aee5f42f1f","name":"Terrassentüre off for 5'","server":"787d7ae2.456504","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.gf_lr_gardendoor2_state","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"off","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"5","forType":"num","forUnits":"minutes","ignorePrevStateNull":true,"ignorePrevStateUnknown":true,"ignorePrevStateUnavailable":true,"ignoreCurrentStateUnknown":true,"ignoreCurrentStateUnavailable":true,"outputProperties":[],"x":160,"y":80,"wires":[["d5b94d21464ac3b1"],["d5b94d21464ac3b1"]]},{"id":"6d0b69a3d2132909","type":"server-state-changed","z":"43fbe4aee5f42f1f","name":"Bewegung Terrasse off for 5'","server":"787d7ae2.456504","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.g_mt_terrasse_motion","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"off","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"5","forType":"num","forUnits":"minutes","ignorePrevStateNull":true,"ignorePrevStateUnknown":true,"ignorePrevStateUnavailable":true,"ignoreCurrentStateUnknown":true,"ignoreCurrentStateUnavailable":true,"outputProperties":[],"x":140,"y":140,"wires":[["d5b94d21464ac3b1"],["d5b94d21464ac3b1"]]},{"id":"d5b94d21464ac3b1","type":"api-current-state","z":"43fbe4aee5f42f1f","name":"Status Terrassentüre off for 5'?","server":"787d7ae2.456504","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"binary_sensor.gf_lr_gardendoor2_state","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":"5","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":450,"y":100,"wires":[["c1f853e24e96b9fd"],["deedf0d53f2a59b7"]],"outputLabels":["geöffnet","geschlossen"]},{"id":"c1f853e24e96b9fd","type":"api-current-state","z":"43fbe4aee5f42f1f","name":"Status Bewegungsmelder off for 5'?","server":"787d7ae2.456504","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"binary_sensor.g_mt_terrasse_motion","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":780,"y":100,"wires":[["1befc090e5b152a4"],["deedf0d53f2a59b7"]],"outputLabels":["Bewegung","keine Bewegung"]},{"id":"deedf0d53f2a59b7","type":"api-call-service","z":"43fbe4aee5f42f1f","name":"Accesspoint einschalten","server":"787d7ae2.456504","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.g_ap_poe"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":990,"y":200,"wires":[[]]},{"id":"1befc090e5b152a4","type":"api-call-service","z":"43fbe4aee5f42f1f","name":"Accesspoint ausschalten","server":"787d7ae2.456504","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.g_ap_poe"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1090,"y":100,"wires":[[]]},{"id":"787d7ae2.456504","type":"server","name":"Home Assistant","version":5,"addon":true,"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","enableGlobalContextStore":true}]