Wait template doesn't work

Hi,
I have both radiator heating and air conditioning heating in a room and want to automate activating both heat sources one after another. First heat the room up with radiator to 18 degrees C. When that temperature is reached, activate the air conditioner for heating to 20 degrees C.

It seams that my automation script is not working but keeps waiting. When I test the template in Developer Template the condition is True.

Can you one of you tell what I am missing?

alias: "Klimaat: Verwarming kamer Damon via Button"
description: ""
trigger:
  - platform: state
    entity_id:
      - input_boolean.verwarming_kamer_damon
    from: "off"
    to: "on"
    id: Verwarming Aan
  - platform: state
    entity_id:
      - input_boolean.verwarming_kamer_damon
    from: "on"
    to: "off"
    id: Verwarming Uit
condition: []
action:
  - if:
      - condition: trigger
        id:
          - Verwarming Aan
    then:
      - service: evohome.set_zone_override
        data:
          entity_id: climate.zolder
          setpoint: 18
          duration: 0
      - wait_template: >-
          wait_template: '{{ states('sensor.zolder_temperatuur_in_de_ruimte') |
          int >= 18 }}'
        continue_on_timeout: false
      - service: climate.turn_on
        target:
          entity_id: climate.zolder_2
        data: {}
      - service: climate.set_temperature
        data:
          hvac_mode: heat
          temperature: 20
        target:
          entity_id: climate.zolder_2
  - if:
      - condition: trigger
        id:
          - Verwarming Uit
    then:
      - service: climate.turn_off
        data: {}
        target:
          entity_id: climate.zolder_2
      - service: evohome.clear_zone_override
        data:
          entity_id: climate.zolder
mode: single

Kind regards,

Marc

take out that, you’re repeating wait_template in

      - wait_template: >-
          wait_template: '{{ states('sensor.zolder_temperatuur_in_de_ruimte') |
          int >= 18 }}'

should be:

      - wait_template: >
          {{ states('sensor.zolder_temperatuur_in_de_ruimte') |int >= 18 }}

also you might need a default value for the |int, but the checker will tell you

1 Like

@Mariusthvdb I was so focussed on the template itself that I completely missed that one. Now it is working. Thank you very much for your help.

1 Like

mark the topic solved so others can see that, and find a solution :wink:

btw Welcome to the community @MarcT , it’s a dynamic place to be…