I flashed a NodeMCU with a thermostatic controller,(heat only) like so:
climate:
- platform: thermostat
name: "Bedroom Thermostat"
id: bedroom_thermostat
min_heating_off_time: 3min
min_heating_run_time: 3min
min_idle_time: 0min
sensor: bedroom_temperature
default_target_temperature_low: 20
heat_deadband: .4
heat_overrun: .4
heat_action:
- switch.turn_on: relay_heater
idle_action:
- switch.turn_off: relay_heater
preset:
- name: Night
default_target_temperature_low: 20
- name: Day
default_target_temperature_low: 22.22
- name: Away
default_target_temperature_low: 18.9
It runs and both presets and target temperature can be controlled from HA frontend thermostat card. I connected a rotary encoder to the NodeMCU to control target temperature, like so:
- platform: rotary_encoder
id: encoder
pin_a:
number: D6
mode: INPUT_PULLUP
pin_b:
number: D7
mode: INPUT_PULLUP
on_clockwise:
then:
- climate.control:
id: bedroom_thermostat
target_temperature_low: !lambda "return id(bedroom_thermostat).target_temperature_low + 0.5;"
on_anticlockwise:
then:
- climate.control:
id: bedroom_thermostat
target_temperature_low: !lambda "return id(bedroom_thermostat).target_temperature_low - 0.5;"
but turning the encoder knob gives this error:
[13:11:46][D][climate:010]: 'Bedroom Thermostat' - Setting
[13:11:46][W][climate:106]: Cannot set low/high target temperature for this device!
Am I using the wrong command, or is the thermostat set up wrong? Thanks for any help.