Switch Outputs on for 2min then off

Hi, for my thermalsolar i need to switch valves and pump ON for 2min, then OFF again.
How can i do this in my Automation?

alias: Heizung Sonnenkollektor Frostschutz
description: ''
trigger:
  - platform: numeric_state
    entity_id: sensor.sonnenkollektor_temp
    below: '0.5'
action:
  - type: turn_on
    device_id: 522e4952768a46569d6810551128cfd2
    entity_id: switch.switch_4_2
    domain: switch
  - type: turn_on
    device_id: 522e4952768a46569d6810551128cfd2
    entity_id: switch.switch_5_2
    domain: switch
  - type: turn_on
    device_id: 522e4952768a46569d6810551128cfd2
    entity_id: switch.switch_6_2
    domain: switch
  - type: turn_on
    device_id: 522e4952768a46569d6810551128cfd2
    entity_id: switch.switch_7_2
    domain: switch
mode: parallel
max: 500

alias: Heizung Sonnenkollektor Frostschutz
description: ''
trigger:
  - platform: numeric_state
    entity_id: sensor.sonnenkollektor_temp
    below: '0.5'
action:
  - variables:
      switches:
        - switch.switch_4_2
        - switch.switch_5_2
        - switch.switch_6_2
        - switch.switch_7_2
  - service: switch.turn_on
    target:
      entity_id: '{{ switches}}'
  - delay: '00:02:00'
  - service: switch.turn_off
    target:
      entity_id: '{{ switches}}'
mode: single 

thank you, that works!

1 Like