Generic Thermostat (AC) + template -> please help me tuning a generic thermostat with steroids!

First of all, thank you very much to everybody reads this post! Thank you very much awesome home assistant community! :smiling_face_with_three_hearts:

I’m configuring my generic thermostat.

This is the standard configuration (and it works pretty well):

#### AC living room
climate:
  - platform: generic_thermostat
    name: AC living room
    unique_id: AC_living_room
    heater: input_boolean.ac_living_room
    target_sensor: sensor.living_room_temperature
    min_temp: 18
    max_temp: 35
    ac_mode: true
    min_cycle_duration:
      minutes: 5 ### <- I'M WORKING ON THIS VALUE
    cold_tolerance: 5 ### <- I'M WORKING ON THIS VALUE
    hot_tolerance: 5 ### <- I'M WORKING ON THIS VALUE
    initial_hvac_mode: "off"

I would like to be able to easily control three values (without changing my configuration.yaml):

  • min_cycle_duration
  • cold_tolerance
  • hot_tolerance

In order to be able to control those three values I’ve created three number helpers:

  • input_number.ac_living_room_min_cycle_duration
  • input_number.ac_living_room_cold_tolerance
  • input_number.ac_living_room_hot_tolerance

Then I tried to change my configuration.yaml as follows:

#### AC living room
climate:
  - platform: generic_thermostat
    name: AC living room
    unique_id: AC_living_room
    heater: input_boolean.ac_living_room
    target_sensor: sensor.living_room_temperature
    min_temp: 18
    max_temp: 35
    ac_mode: true
    min_cycle_duration:
      minutes: "{{ states('input_number.ac_living_room_min_cycle_duration') | float }}"
    cold_tolerance: "{{ states('input_number.ac_living_room_cold_tolerance') | float }}"
    hot_tolerance: "{{ states('input_number.ac_living_room_hot_tolerance') | float }}"
    initial_hvac_mode: "off"

Unfortunately it doesn’t work: when I check my configuration.yaml, home assistant tells me that the three values above (min_cycle_duration, cold_tolerance and hot_tolerance) expect a float value.

Any idea?

Thank you very much to everybody wants to help me!!

PD: I tried to write this post in the simplest way possible, so that I hope that my problem is easily understandable; if I couldn’t explain myself properly, I apologise (I’m italian), and I’ll provide further details!

Thank you :heart:

Andrea

None of those options support templates. If the documentation does not explicitly state that it supports templates then it does not.

1 Like

Oh sorry… thank you very much! So… I’ll try to find out a walk around… thank you very much!

What you can do is use automation to turn the generic thermostat on/off and manipulate the setpoint. With these you should be able to accomplish what you are trying to do.

For example a cold tolerance of 2 means that if the AC turns on at 70, it will turn off at 68. So when the AC turns on at 70, you could run a script to change the setpoint to 68, when the AC turns off restore it to 70.

1 Like

Thank you very much for your answer! :slight_smile: