Hi.
I have written my first automation to change 2 thermostat temps. at a certain time during work days (please see below). I must have a syntax error as only the first one (south) works. Some help please with getting both to work. Thanks in advance.
action:
service: climate.set_temperature
data:
#(Living Room S - Thermostat)
entity_id: climate.danfoss_z_thermostat_014g0013_heating_1_2
temperature: 21.0
alias: Work day temp raise-S
condition:
condition: state
entity_id: binary_sensor.workday_sensor
state: ‘on’
id: ‘1522242928768’
trigger:
at: ‘15:30:00’
platform: time
service: climate.set_temperature
data:
#(Living Room N - Thermostat)
entity_id: climate.danfoss_z_thermostat_014g0013_heating_1_3
temperature: 20.5
alias: Work day temp raise-N
condition:
condition: state
entity_id: binary_sensor.workday_sensor
state: ‘on’
id: ‘1522242928768’
trigger:
Your formatting still seems off. How do both automations fall under ONE - action:?
Was this done in the automation editor?
I think this entire automations.yaml is jacked up. - action: should not be the root of the file, with the automations under it. each automation should have a root on the file.
Try this:
- alias: Work day temp raise-S
id: '1522242928768'
trigger:
at: '15:30:00'
platform: time
condition:
condition: state
entity_id: binary_sensor.workday_sensor
state: 'on'
action:
- service: climate.set_temperature
data:
# (Living Room S - Thermostat)
entity_id: climate.danfoss_z_thermostat_014g0013_heating_1_2
temperature: 21.0
- alias: Work day temp raise-N
id: '1522242928768'
trigger:
at: '15:30:00'
platform: time
condition:
condition: state
entity_id: binary_sensor.workday_sensor
state: 'on'
action:
- service: climate.set_temperature
data:
# (Living Room N - Thermostat)
entity_id: climate.danfoss_z_thermostat_014g0013_heating_1_3
temperature: 20.5
The frontend editor places everything in alphabetical order. It simply prints an ordered dictionary. So everything at a specific indent level will be in alphabetical order:
I started writing the automation in the editor, but when it didn’t work and I checked the example documentation for the climate automation, I edited the file directly.
Now I understand the discrepancy in the order as petro explained (thanks).
What I am trying to do basically is to get both thermostats (which are at opposite ends of the same room) to change temps at the same time each working day but with slightly different temperatures. When working, I will just copy to make a similar automation to reduce the temps again in the late evening.