Hi there.
Following this post, I was playing around with Climate Generic Thermostat.
What I would like is to be able to turn it on/off based on an input_boolean and keep the target temperature after a restart (without the default).
Here is my relevant config:
climate:
- platform: generic_thermostat
name: Termostato Sala
heater: switch.tomada_sala
target_sensor: sensor.temperature_158d00012356d8
min_temp: 19
max_temp: 23
min_cycle_duration: 5
# target_temp: 20
tolerance: 1
operation_mode: Heat
input_boolean:
temp_sala_auto:
name: On/Off
# initial: off
icon: mdi:thermometer-lines
automation:
- alias: "Thermostat On"
trigger:
platform: state
entity_id: input_boolean.temp_sala_auto
from: 'off'
to: 'on'
action:
- service: climate.set_temperature
data:
entity_id: climate.termostato_sala
temperature: 20
- alias: "Thermostat Off"
trigger:
platform: state
entity_id: input_boolean.temp_sala_auto
from: 'on'
to: 'off'
action:
- service: climate.set_temperature
data:
entity_id: climate.termostato_sala
temperature: 0
Still then, even if I leave the input_boolean on and restart, its state is kept, but not the target temperature set before the restart.
I even tried this, but it also doesn’t work:
automation:
- alias: "If Thermostat is On after restart, make sure temperature is set right"
trigger:
- platform: homeassistant
event: start
condition:
condition: state
entity_id: input_boolean.notify_home
state: 'on'
action:
- service: climate.set_temperature
data:
entity_id: climate.termostato_sala
temperature: 20
- alias: "If Thermostat is Off after restart, make sure temperature is set right"
trigger:
- platform: homeassistant
event: start
condition:
condition: state
entity_id: input_boolean.notify_home
state: 'off'
action:
- service: climate.set_temperature
data:
entity_id: climate.termostato_sala
temperature: 0
Is this is an issue or am I missing something?
Thanks in advance.