Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 101645

Question about generic_thermostat

$
0
0

@ncortines wrote:

Hi,

I have a question about the generic_thermostat configuration

My configuration looks like this:

temperature_xiaomi_air_1:
  unit_of_measurement: '°C'
  value_template: "{{ states.fan.xiaomi_air_1.attributes.temperature }}"
  device_class: temperature
- platform: generic_thermostat
  name: thermostat_bedroom
  heater: switch.heater_bedroom
  target_sensor: sensor.temperature_xiaomi_air_1
  min_temp: 16
  max_temp: 26
  ac_mode: False
  target_temp: 20.5
  cold_tolerance: 0.1
  hot_tolerance: 0.1
  min_cycle_duration:
    seconds: 5
  keep_alive:
    minutes: 3
  initial_operation_mode: "auto"
  away_temp: 16

The problem with this configuration is that if the temperature sensor becomes unavailable while thermostat is on heat mode, it continues in heat mode indefinitely.

As a workaround I changed the sensor’s template configuration so the value is 999 when the data is not available:

temperature_xiaomi_air_1:
  unit_of_measurement: '°C'
  value_template: "{{ states.fan.xiaomi_air_1.attributes.temperature or 999 }}"
  device_class: temperature

Apart from being not too elegant, it messes up the sensor/thermostat history, which normally I find useful.

I there a better way to handle the sensor unavailability so the thermostat goes idle without this workaround?

Thanks,
Juan

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 101645

Trending Articles