#2 way esphome sync

1 messages · Page 1 of 1 (latest)

pearl tide
#

I have built a esphome device to act as a thermostat using an ESP32 mini, thermistor, rotary encoder, oled display and a relay to control the heating in my cottage. Using the HA generic-thermostat I can control the target_temp using the rotary encoder. However I would like the HA generic-thermostat to be able to change the value of the rotary encoder using the GUI as well. I have tried setting the target_temp value in the climate configuration to a template sensor to various different versions

#

Example:

#
  - platform: template
    sensors:
      livingroom_target_temp:
        friendly_name: "Living Room Target Temperature"
        value_template: "{{ states('input_number.target_temperature_thermistor') | float }}"

climate:
  - platform: generic_thermostat
....
    target_temp: sensor.livingroom_target_temp```

Regardless of how it is expressed I get the following error:
Invalid config for [climate.generic_thermostat]: expected float for dictionary value @ data['target_temp']. Got 'sensor.livingroom_target_temp'. (See ?, line ?).
#

Is it possible to do this at all? I have looked at many attempts to solve this and tried them all. The error seems to indicate to me that you cannot write something other than a float like 20.0.

I am considering forking the repository and seeing if I can extend it to include this capability, however I would like to avoid that.

valid sedge
#

you don't need to fork anything. Just set that value to a number, then write an automation that changes the target temp when you change the input_number