Hi,
I checked many examples and the docs and built this:
automations.yaml
- alias: Fenster auf Wohnzimmer
trigger:
platform: state
entity_id: binary_sensor.oeq1986163_state
to: 'on'
action:
- service: input_number.set_value
data_template:
entity_id: input_number.old_temp_wohnzimmer
value: '{{ states.climate.wohnzimmer.attributes.temperature | float }}'
- service: climate.set_temperature
data:
entity_id: climate.wohnzimmer
temperature: '4.5'
- alias: Fenster zu Wohnzimmer
trigger:
platform: state
entity_id: binary_sensor.oeq1986163_state
to: 'off'
action:
service: climate.set_temperature
data_template:
entity_id: climate.wohnzimmer
temperature: '{{ states.input_number.old_temp_wohnzimmer.state }}'
and the check says:
> Invalid config for [automation]: invalid template (TemplateSyntaxError: Encountered unknown tag ‘input_number’.) for dictionary value @ data[‘action’][0][‘data_template’][‘temperature’]. Got None. (See /config/configuration.yaml, line 14). Please check the docs at https://home-assistant.io/components/automation/
edit: It’s working now!
configuration.yaml:
input_number:
old_temp_wohnzimmer:
name: Wohnzimmer Temperatur vor Aktion
min: 4.5
max: 35
step: 0.5
mode: box
What am I doing wrong again?