Hello.
I have automated my heatpump to the point I’m seeing some interesting power savings without change in comfort (and hopefully not too much wear on tear on it either).
It is using a generic_thermostat
and some hijacked IR codes. I would like to experiment some more with hot_tolerance
and cold_tolerance
, ideally I’d like to change these two points instead of a trip temperature, since a thermostat naturally operates by a hysteresis and these two points, not oscillating dumbly around a set point. But a user is mostly presented with a single temperature, for UX and ease-of-use reasons, and isn’t really aware of this concept.
I don’t care about ease-of-use and UX, I am aware of this concept which hass implements, and I want to control these two points instead of a single temperature. I don’t mind if I have to set a dummy temperature between them either, as long as I can control those two points.
This is my configuration
climate:
- platform: generic_thermostat
name: BMS12HD
# icon: "hass:air-conditioner"
ac_mode: true
heater: switch.ac_compressor
target_sensor: sensor.weighted_temperature
target_temp: 24.3
min_cycle_duration: 00:30:00
keep_alive: 00:02:00
away_temp: 26
precision: 0.1
min_temp: 16
max_temp: 30
hot_tolerance: 1.4
cold_tolerance: 0.5
The thermostats and lovelace UIs are nice, but they only go in 0.5 degree steps anyway. I have this script when I want more precision. My sensors are a more complex setup, but the final sensor value weighs in the room I’m in and a few sensors near the ceiling and floor, so the precision I want is there.
alias: script_manually_set_ac_values
sequence:
- service: climate.set_temperature
data_template:
entity_id: climate.hyundai_bms12hd
temperature: |
{{ states.input_number.ac_manual_override.state | float}}
mode: single
I want to alter the hysteresis points (cold_tolerance and hot_tolerance) from a script. I can do this
by config file and restart, of course, but I want to do it dynamically, so I can eventually implement them in a more complex controller - for example taking into account running 3 hours for a -0.5 heat change, which was lost in 10 minutes.
But with a dummy test like this, it still fails:
alias: script_manually_set_ac_values
sequence:
- service: climate.set_temperature
data_template:
entity_id: climate.hyundai_bms12hd
temperature: |
{{ states.input_number.ac_manual_override.state | float}}
cold_tolerance: 0.5
mode: single
And I get: Failed to call service script/manually_set_ac_values. extra keys not allowed @ data['cold_tolerance']
Just to be extra clear, I don’t want to alter the range of the sliders themselves (climate.target_temp_high
and climate.target_temp_low
), I want to alter the temperatures at which the generic_thermostat
fires the state.cool
and state.idle
events.
These values correspond to target_temp - cold_tolerance
and target_temp + hot_tolerance
, or in my case 23.8 (24.3 - 0.5) and 25.7 (24.3+1.4). I want a way to change those 23.8 and 25.7 from a script, without rewriting my config file and restarting hass.
Thanks.