Automation with both service and data_template fails

Hi,

Been trying to get the data_template to work in this automation (works fine with ‘data’ only and without the {{…}} )

- id: ac_off
  alias: Varmepumpe AV basert på temperatur
  trigger:
  - entity_id: binary_sensor.high_temp_input
    platform: state
    to: 'on'
  - event: start
    platform: homeassistant
  action:
  - entity_id: climate.hytta
    service: climate.turn_off
  - data_template:
      message: "Stua hytta er over {{ input_number.high_temp_stue }} grader, skrur av varmepumpe!"
    service: notify.stigh

The Automation works but no message is pushed… How am I using data_template wrong?

  - data_template:
      message: "Stua hytta er over {{ states('input_number.high_temp_stue') }} grader, skrur av varmepumpe!"
    service: notify.stigh

Thx @123 :slight_smile:

1 Like