Hello good morning, I am new to HA world and programming automation in yaml…
I wrote this automation but it doesn’t work in my HA, there must be syntax errors in the yaml code:
I want to create an automation that when the temperature increases → send me an email: boiler works wellel
CODE YAML:
- alias: Controller_Boiler_works_good
trigger:- platform: numeric_state
entity_id: sensor.sonoff_XXXXX_temperature
#value_template: ‘{{ #states.sensor.sonoff_XXXXX_temperature.attributes.current_temperature }}’
value_template: ‘{{ states(sensor.sonoff_XXXXX_temperature) }}’
condition: - condition: template
value_template: ‘{{ trigger.from_state.state < trigger.to_state.state }}’ - platform: state
entity_id: switch.sonoff_XXXXX
from: ‘off’
to: ‘on’
action:- service: notify.mail
data:
message: OK Boiler works good
title: OK Boiler works good
- service: notify.mail
- platform: numeric_state