For minute in trigger

Not sure I followed everything in those flows. If you give a description of exactly what you’re trying to do and when to reset when what changes. For the Door/windows sensors, do you want those to reset the timer if one or all go to an off state? Same with the Gruppo Finestre?

[{"id":"3ef3b4de.d3155c","type":"trigger","z":"5780fdbe.51efb4","op1":"","op2":"off","op1type":"nul","op2type":"str","duration":"2","extend":false,"units":"min","reset":"on","bytopic":"all","name":"Deleyed Off","x":390,"y":160,"wires":[["b5a6fc3a.0dd98"]]},{"id":"b5a6fc3a.0dd98","type":"api-current-state","z":"5780fdbe.51efb4","name":"Stagione Invernale","version":1,"outputs":2,"halt_if":"winter,autumn","halt_if_type":"str","halt_if_compare":"includes","override_topic":true,"entity_id":"sensor.season","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":true,"x":586,"y":160,"wires":[["ea89418b.253f2"],[]]},{"id":"ea89418b.253f2","type":"api-call-service","z":"5780fdbe.51efb4","name":"Riscaldamento away","version":1,"debugenabled":false,"service_domain":"climate","service":"set_preset_mode","entityId":"climate.netatmo_cucina","data":"{\"preset_mode\":\"away\"}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":820,"y":160,"wires":[[]]},{"id":"e9d55746.cd9ad8","type":"server-state-changed","z":"5780fdbe.51efb4","name":"Finestra_Cameretta_Thermo_off","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.door_window_sensor_158d0000ed2dd2","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,"x":146,"y":64,"wires":[["3ef3b4de.d3155c","74acaa1b.517d64"],["1588e29b.5b3b8d"]]},{"id":"7326ea6f.92a014","type":"server-state-changed","z":"5780fdbe.51efb4","name":"Door/Window Sensors","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.door_window_sensor_158d0000e8bc0e,binary_sensor.door_window_sensor_158d0000f42bda,binary_sensor.door_window_sensor_158d0000e91709,binary_sensor.door_window_sensor_158d0000e8bc0e","entityidfiltertype":"substring","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":116,"y":160,"wires":[["3ef3b4de.d3155c"],[]]},{"id":"73907b93.e2eb14","type":"server-state-changed","z":"5780fdbe.51efb4","name":"Gruppo Finestre","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"group.windows_view","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,"x":96,"y":224,"wires":[["e0aa3dcb.cdcc8"],[]]},{"id":"e0aa3dcb.cdcc8","type":"trigger","z":"5780fdbe.51efb4","op1":"","op2":"off","op1type":"nul","op2type":"str","duration":"2","extend":false,"units":"min","reset":"on","bytopic":"all","name":"Deleyed Off","x":390,"y":224,"wires":[["feb6e4d1.e52448"]]},{"id":"feb6e4d1.e52448","type":"api-current-state","z":"5780fdbe.51efb4","name":"Stagione Invernale","version":1,"outputs":2,"halt_if":"winter,autumn","halt_if_type":"str","halt_if_compare":"includes","override_topic":true,"entity_id":"sensor.season","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":true,"x":586,"y":224,"wires":[["268ccd25.f33dc2"],[]]},{"id":"268ccd25.f33dc2","type":"api-call-service","z":"5780fdbe.51efb4","name":"Riscaldamento Auto","version":1,"debugenabled":false,"service_domain":"climate","service":"set_hvac_mode","entityId":"climate.netatmo_cucina","data":"{\"hvac_mode\":\"auto\"}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":820,"y":224,"wires":[[]]},{"id":"d25da0f6.763f7","type":"api-current-state","z":"5780fdbe.51efb4","name":"Stagione Invernale","version":1,"outputs":2,"halt_if":"winter,autumn","halt_if_type":"str","halt_if_compare":"includes","override_topic":false,"entity_id":"sensor.season","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":true,"x":586,"y":64,"wires":[["8005a5c.cf8a058"],[]]},{"id":"8005a5c.cf8a058","type":"api-call-service","z":"5780fdbe.51efb4","name":"Scaldino on/off","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.plug_158d0001041082","data":"","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":800,"y":64,"wires":[[]]},{"id":"74acaa1b.517d64","type":"ha-wait-until","z":"5780fdbe.51efb4","name":"","outputs":2,"entityId":"binary_sensor.door_window_sensor_158d0000ed2dd2","property":"state","comparator":"is_not","value":"on","valueType":"str","timeout":"4","timeoutUnits":"minutes","entityLocation":"","entityLocationType":"none","checkCurrentState":true,"blockInputOverrides":true,"x":380,"y":64,"wires":[[],["d25da0f6.763f7"]]},{"id":"1588e29b.5b3b8d","type":"ha-wait-until","z":"5780fdbe.51efb4","name":"","outputs":2,"entityId":"binary_sensor.door_window_sensor_158d0000ed2dd2","property":"state","comparator":"is_not","value":"off","valueType":"str","timeout":"4","timeoutUnits":"minutes","entityLocation":"","entityLocationType":"none","checkCurrentState":true,"blockInputOverrides":true,"x":380,"y":112,"wires":[[],["4bfadc32.9b15a4"]]},{"id":"4bfadc32.9b15a4","type":"change","z":"5780fdbe.51efb4","name":"turn on","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"service\": \"turn_on\"}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":556,"y":112,"wires":[["d25da0f6.763f7"]]}]

this is the automation

#- id: Finestra_Cucina_Sx_Thermo_off
#  alias: 'Finestra Cucina Sx - Thermo off'
#  trigger:
#    platform: state
#    entity_id: binary_sensor.door_window_sensor_158d0000e91709
#    from: 'off'
#    to: 'on'
#    for:
#      minutes: 2
#  action:
#  - service: climate.set_preset_mode
#    data:
#      entity_id: climate.netatmo_cucina
#      preset_mode: away
#      
#- id: Finestra_Cucina_Dx_Thermo_off
#  alias: 'Finestra Cucina Dx - Thermo off'
#  trigger:
#    platform: state
#    entity_id: binary_sensor.door_window_sensor_158d0000e8bc0e
#    from: 'off'
#    to: 'on'
#    for:
#      minutes: 2
#  action:
#  - service: climate.set_preset_mode
#    data:
#      entity_id: climate.netatmo_cucina
#      preset_mode: away
      
#- id: Finestra_Cameretta_Thermo_off
#  alias: 'Finestra Cameretta - Thermo off'
#  trigger:
#    platform: state
#    entity_id: binary_sensor.door_window_sensor_158d0000ed2dd2
#    from: 'off'
#    to: 'on'
#    for:
#      minutes: 2
#  action:
#  - service: climate.set_preset_mode
#    data:
#      entity_id: climate.netatmo_cucina
#      preset_mode: away
      
#- id: Finestra_Cameretta_scaldino_off
#  alias: 'Finestra Cameretta - scaldino off'
#  trigger:
#    platform: state
#    entity_id: binary_sensor.door_window_sensor_158d0000ed2dd2
#    from: 'off'
#    to: 'on'
#    for:
#      minutes: 2
#  action:
#  - service: switch.turn_off
#    data:
#      entity_id: switch.plug_158d0001041082

#- id: Finestra_Cameretta_scaldino_on
#  alias: 'Finestra Cameretta - scaldino on'
#  trigger:
#    platform: state
#    entity_id: binary_sensor.door_window_sensor_158d0000ed2dd2
#    from: 'on'
#    to: 'off'      
#  condition:
#    condition: or
#    conditions:
#    - condition: state
#      entity_id: sensor.season
#      state: autumn
#    - condition: state
#      entity_id: sensor.season
#      state: winter
#  action:
#  - service: switch.turn_off
#    data:
#      entity_id: switch.plug_158d0001041082
#      
      
#- id: Finestra_Letto_Dx_Thermo_off
#  alias: 'Finestra Letto Dx - Thermo off'
#  trigger:
#    platform: state
#    entity_id: binary_sensor.door_window_sensor_158d0000e8bc0e
#    from: 'off'
#    to: 'on'
#    for:
#      minutes: 2
#  action:
#  - service: climate.set_preset_mode
#    data:
#      entity_id: climate.netatmo_cucina
#      preset_mode: away
      
#- id: Finestra_Letto_Sx_Thermo_off
#  alias: 'Finestra Letto Sx - Thermo off'
#  trigger:
#    platform: state
#    entity_id: binary_sensor.door_window_sensor_158d0000f42bda
#    from: 'off'
#    to: 'on'
#    for:
#      minutes: 2
#  action:
#  - service: climate.set_preset_mode
#    data:
#      entity_id: climate.netatmo_cucina
#      preset_mode: away
      
#- id: turn_on_the_radiator_again
#  alias: 'If the window is closed for 3 minutes turn on the radiator again'
#  trigger:
#    platform: state
#    entity_id: group.windows_view
#    from: 'on'
#    to: 'off'
#    for:
#      minutes: 2
#  condition:
#    condition: or
#    conditions:
#    - condition: state
#      entity_id: sensor.season
#      state: autumn
#    - condition: state
#      entity_id: sensor.season
#      state: winter
#  action:
#  - service: climate.set_hvac_mode
#    data:
#      entity_id: climate.netatmo_cucina
#      hvac_mode: auto

This should close to a carbon copy of the above automation.

[{"id":"4eca2ded.c68cb4","type":"trigger-state","z":"5780fdbe.51efb4","name":"","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"group.windows_view","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"id":"5zwnsjapqig","targetType":"this_entity","targetValue":"","propertyType":"previous_state","propertyValue":"old_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"on"},{"id":"i9pxva4apm","targetType":"this_entity","targetValue":"","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"off"},{"id":"ptw1o3l8uu","targetType":"entity_id","targetValue":"sensor.season","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"includes","comparatorValueDatatype":"list","comparatorValue":"autumn,winter"}],"constraintsmustmatch":"all","outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":156,"y":512,"wires":[["401e32ed.765c4c"],[]]},{"id":"401e32ed.765c4c","type":"ha-wait-until","z":"5780fdbe.51efb4","name":"","outputs":2,"entityId":"group.windows_view","property":"state","comparator":"is_not","value":"off","valueType":"str","timeout":"2","timeoutUnits":"minutes","entityLocation":"","entityLocationType":"none","checkCurrentState":true,"blockInputOverrides":true,"x":380,"y":512,"wires":[[],["bdc4c2cb.636b1"]]},{"id":"bdc4c2cb.636b1","type":"api-call-service","z":"5780fdbe.51efb4","name":"Riscaldamento Auto","version":1,"debugenabled":false,"service_domain":"climate","service":"set_hvac_mode","entityId":"climate.netatmo_cucina","data":"{\"hvac_mode\":\"auto\"}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":596,"y":512,"wires":[[]]},{"id":"91af06e1.ff08a8","type":"server-state-changed","z":"5780fdbe.51efb4","name":"Finestra_Cameretta_Thermo_off","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.door_window_sensor_158d0000ed2dd2","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,"x":146,"y":320,"wires":[["a37ee9b0.b61908"],["77263d4f.017fd4"]]},{"id":"836f02b.cf6be","type":"api-current-state","z":"5780fdbe.51efb4","name":"Stagione Invernale","version":1,"outputs":2,"halt_if":"winter,autumn","halt_if_type":"str","halt_if_compare":"includes","override_topic":false,"entity_id":"sensor.season","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":true,"x":586,"y":368,"wires":[["7364efd6.8746b"],[]]},{"id":"7364efd6.8746b","type":"api-call-service","z":"5780fdbe.51efb4","name":"Scaldino on/off","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.plug_158d0001041082","data":"","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":576,"y":320,"wires":[[]]},{"id":"a37ee9b0.b61908","type":"ha-wait-until","z":"5780fdbe.51efb4","name":"","outputs":2,"entityId":"binary_sensor.door_window_sensor_158d0000ed2dd2","property":"state","comparator":"is_not","value":"on","valueType":"str","timeout":"2","timeoutUnits":"minutes","entityLocation":"","entityLocationType":"none","checkCurrentState":true,"blockInputOverrides":true,"x":380,"y":320,"wires":[[],["7364efd6.8746b"]]},{"id":"77263d4f.017fd4","type":"change","z":"5780fdbe.51efb4","name":"turn on","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"service\": \"turn_on\"}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":368,"wires":[["836f02b.cf6be"]]},{"id":"ebd8127f.15815","type":"trigger-state","z":"5780fdbe.51efb4","name":"door/window sensors","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"binary_sensor.door_window_sensor_158d0000e91709,binary_sensor.door_window_sensor_158d0000e8bc0e,binary_sensor.door_window_sensor_158d0000ed2dd2,binary_sensor.door_window_sensor_158d0000e8bc0e,binary_sensor.door_window_sensor_158d0000f42bda","entityidfiltertype":"substring","debugenabled":false,"constraints":[{"id":"nzwln8etyn","targetType":"this_entity","targetValue":"","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"on"},{"id":"f34ptsod2eb","targetType":"this_entity","targetValue":"","propertyType":"previous_state","propertyValue":"old_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"off"}],"constraintsmustmatch":"all","outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":116,"y":416,"wires":[["31aa45e1.5cd2fa"],["6893e557.7fa3cc"]]},{"id":"31aa45e1.5cd2fa","type":"trigger","z":"5780fdbe.51efb4","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"2","extend":false,"units":"min","reset":"","bytopic":"topic","name":"","x":390,"y":416,"wires":[["b24efd36.63441"]]},{"id":"6893e557.7fa3cc","type":"change","z":"5780fdbe.51efb4","name":"reset","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":464,"wires":[["31aa45e1.5cd2fa"]]},{"id":"b24efd36.63441","type":"api-call-service","z":"5780fdbe.51efb4","name":"Riscaldamento away","version":1,"debugenabled":false,"service_domain":"climate","service":"set_preset_mode","entityId":"climate.netatmo_cucina","data":"{\"preset_mode\":\"away\"}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":596,"y":416,"wires":[[]]}]

edit:
Actually misread one of them, you can remove the turn on change node and just connect the events: state and current state nodes together. I thought it read to turn on the switch.

ok now i try.
if I can ask you for another help.
I would like the spottini to slowly and gradually reduce the brightness down to the zero value and then switch off only after the whole suffused spottini group is off after 3 minutes.
this is what I had created. thank you very much
https://pastebin.com/QHwxz9x7

[{"id":"188da626.6a2b0a","type":"server-state-changed","z":"5780fdbe.51efb4","name":"Spottini soffusi","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"group.cucinamensola_view","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,"x":112,"y":944,"wires":[["2251c017.ab51e"],[]]},{"id":"2251c017.ab51e","type":"ha-wait-until","z":"5780fdbe.51efb4","name":"","outputs":2,"entityId":"group.cucinamensola_view","property":"state","comparator":"is_not","value":"off","valueType":"str","timeout":"2","timeoutUnits":"minutes","entityLocation":"","entityLocationType":"none","checkCurrentState":true,"blockInputOverrides":true,"x":268,"y":944,"wires":[[],["2f290cdf.553614"]]},{"id":"2f290cdf.553614","type":"api-call-service","z":"5780fdbe.51efb4","name":"spottino","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.spottino1,light.spottino2,light.spottino3,light.spottino4","data":"{\"color_temp\":333,\"brightness\":3}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":428,"y":944,"wires":[["2dc6872a.cc46e8"]]},{"id":"2dc6872a.cc46e8","type":"delay","z":"5780fdbe.51efb4","name":"","pauseType":"delay","timeout":"150","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":582,"y":944,"wires":[["5546ef12.5eecd"]]},{"id":"5546ef12.5eecd","type":"switch","z":"5780fdbe.51efb4","name":"","property":"payload.data.brightness","propertyType":"msg","rules":[{"t":"eq","v":"3","vt":"str"},{"t":"eq","v":"2","vt":"str"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":722,"y":944,"wires":[["41fc62c9.682b1c"],["63a7679f.dc9648"],["5d72bd24.b8c624"]]},{"id":"41fc62c9.682b1c","type":"change","z":"5780fdbe.51efb4","name":"Brightness 2","rules":[{"t":"set","p":"payload.data.brightness","pt":"msg","to":"2","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":896,"wires":[["2f290cdf.553614"]]},{"id":"63a7679f.dc9648","type":"change","z":"5780fdbe.51efb4","name":"Brightness 1","rules":[{"t":"set","p":"payload.data.brightness","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":944,"wires":[["2f290cdf.553614"]]},{"id":"5d72bd24.b8c624","type":"api-call-service","z":"5780fdbe.51efb4","name":"spottino","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.spottino1,light.spottino2,light.spottino3,light.spottino4","data":"","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":860,"y":992,"wires":[[]]}]

[{"id":"ad89b1e8.3f876","type":"server-state-changed","z":"5780fdbe.51efb4","name":"Spottini soffusi","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"group.cucinamensola_view","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,"x":128,"y":1152,"wires":[["e6800dbc.1be11"],[]]},{"id":"e6800dbc.1be11","type":"ha-wait-until","z":"5780fdbe.51efb4","name":"","outputs":2,"entityId":"group.cucinamensola_view","property":"state","comparator":"is_not","value":"off","valueType":"str","timeout":"2","timeoutUnits":"minutes","entityLocation":"","entityLocationType":"none","checkCurrentState":true,"blockInputOverrides":true,"x":284,"y":1152,"wires":[[],["beef99ec.0d1078"]]},{"id":"beef99ec.0d1078","type":"api-call-service","z":"5780fdbe.51efb4","name":"spottino","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.spottino1,light.spottino2,light.spottino3,light.spottino4","data":"{\"color_temp\":333,\"brightness\":3}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":444,"y":1152,"wires":[["3ee42318.f69cac"]]},{"id":"3ee42318.f69cac","type":"function","z":"5780fdbe.51efb4","name":"","func":"if(msg.payload.service === \"turn_off\") return;\n\nswitch(msg.payload.data.brightness) {\n    case 3:\n    case 2:\n        msg.payload.data.brightness--;\n        return msg;\n}\n\nmsg.payload.service = \"turn_off\";\nmsg.payload.data = {};\n    \nreturn msg;","outputs":1,"noerr":0,"x":578,"y":1152,"wires":[["ea950825.948808"]]},{"id":"ea950825.948808","type":"delay","z":"5780fdbe.51efb4","name":"","pauseType":"delay","timeout":"150","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":726,"y":1152,"wires":[["beef99ec.0d1078"]]}]

do I have to insert only one of these flows or both?

Just a quick note to explain why this is a flawed method of doing this, because it’s a very easy mistake to make

for:
  minutes: 2

means that the sensor needs to be on for two minutes without any change during those two minutes, while a state -> delay -> check method will only see that the sensor is on at those exact moments that it is checked, and whatever happens during the delay is not taken into consideration at all.

I also suggested a “wait until” node with a timeout of 2 minutes.

That doesn’t make the initial and repeated suggestion of delay and recheck any more correct.

Anyway, it wasn’t my intention to call you out in any way with my explanation. It is a very common and easy mistake to make, and it just happened to be your post that got quoted this time.

Well, it all depends on what they actually want. If it doesn’t matter if the trigger changes state between firing and checking state, then it doesn’t matter which option is used.

I never said it was correct, I said it was a way to accomplish the end goal. I didn’t say it was the ONLY way.

What the OP actually want is clearly stated in the first post; to translate the trigger, and especially the for-statement, from yaml to Node-RED. This excludes the specific method that make use of delay.

Anyway, this is going nowhere, and a working solution has already been posted by other users.

1 Like

If you say so, boss.

I agree. You called me out for no reason, other than to start this.

in this case the flow is right?
often my presence at home is not detected and the flow does not start or start late

https://pastebin.com/cHNZGWX2

Sorry. I am obviously not “qualified” to assist any longer in this thread. I hope you find your answer.