When my ESP thermostat boots, as when I update it, it is supposed to set the custom preset and target temperature, like so:
on_boot:
then:
- ds1307.read_time:
- climate.control:
id: livingroom_thermostat
custom_preset: Night
mode: heat
target_temperature_low: 20
The thermostat with its custom presets is this:
climate:
- platform: thermostat
min_heating_off_time: 0s
min_heating_run_time: 0s
min_idle_time: 0s
visual:
min_temperature: 15.55556 °C
max_temperature: 26.66667 °C
temperature_step: 0.277778 °C
name: "Living Room Thermostat"
id: livingroom_thermostat
sensor: livingroom_thermostat_temperature
heat_deadband: 0.277778
heat_overrun: 0
heat_action:
- switch.turn_on: livingroom_relay_heater
- lambda: id(fire).publish_state(true);
- homeassistant.service:
service: homeassistant.turn_on
data:
entity_id: ${entity_heater}
idle_action:
- switch.turn_off: livingroom_relay_heater
- lambda: id(fire).publish_state(false);
- homeassistant.service:
service: homeassistant.turn_off
data:
entity_id: ${entity_heater}
preset:
- name: Night
default_target_temperature_low: 20
- name: Day
default_target_temperature_low: 22.22
- name: Holiday
default_target_temperature_low: 18.9
- name: Summer
default_target_temperature_low: 20
When the ESP boots, it sets the preset to Night, but leaves the target temperature at whatever it was before the boot. How can I ensure the target temperature is set at boot? Alternately, is there a way to declare a preset to be the default and have it set at boot? Thanks.