jmcollin78 / versatile_thermostat

A full featured Thermostat for Home Assistant: presets, window, motion, presence and overpowering management
MIT License
328 stars 34 forks source link

No floating point value can be set for the target temperature #295

Closed maschulze closed 10 months ago

maschulze commented 11 months ago

Version of the custom_component

v5.1.0

Configuration

My VTherm attributes are the following:

hvac_modes: off, heat, auto
min_temp: 5
max_temp: 30
target_temp_step: 0.5
preset_modes: none, frost, eco, comfort, boost
current_temperature: 21.4
temperature: 22
hvac_action: heating
preset_mode: none
is_on: true
hvac_mode: heat
type: null
frost_temp: 5
eco_temp: 21.5
boost_temp: 30
comfort_temp: 22.5
frost_away_temp: 5
eco_away_temp: 5
boost_away_temp: 5
comfort_away_temp: 5
power_temp: null
target_temperature_step: 0.5
ext_current_temperature: 10.18
ac_mode: false
current_power: null
current_power_max: null
saved_preset_mode: comfort
saved_target_temp: 22
saved_hvac_mode: null
window_state: off
motion_state: null
overpowering_state: null
presence_state: null
window_auto_state: off
window_bypass_state: false
security_delay_min: 60
security_min_on_percent: 0.5
security_default_on_percent: 0.1
last_temperature_datetime: 2023-12-24T11:12:00.442140+01:00
last_ext_temperature_datetime: 2023-12-24T11:08:32.625338+01:00
security_state: false
minimal_activation_delay_sec: 10
device_power: 1
mean_cycle_power: null
total_energy: 1.77
last_update_datetime: 2023-12-24T11:30:05.806249+01:00
timezone: Europe/Berlin
window_sensor_entity_id: null
window_delay_sec: null
window_auto_enabled: false
window_auto_open_threshold: null
window_auto_close_threshold: null
window_auto_max_duration: null
motion_sensor_entity_id: null
presence_sensor_entity_id: null
power_sensor_entity_id: null
max_power_sensor_entity_id: null
temperature_unit: °C
is_device_active: true
ema_temp: 21.5
is_over_climate: true
start_hvac_action_date: 2023-12-24T10:42:57.461777+01:00
underlying_climate_0: climate.bosch_thermostat_wohnzimmer
underlying_climate_1: null
underlying_climate_2: null
underlying_climate_3: null
auto_fan_mode: auto_fan_none
current_auto_fan_mode: auto_fan_none
auto_activated_fan_mode: null
auto_deactivated_fan_mode: null
friendly_name: Versatile Thermostat (Wohnzimmer)
supported_features: 17

Describe the bug

In version v5.1.0, it no longer seems possible to set floating point values for the target temperature. It does not matter whether this is set by preset, by scheduler or by UI. After a short time, the target temperature is corrected to an integer value.

I'm trying to: Set target temperature to value of 21,5 °C

And I expect: The target temperature should be set to 21.5 °C and should not change.

But I observe this ... The target temperature is set to 21.5 °C and changes to 22 °C after a while.

Ra72xx commented 11 months ago

I have that bug, too. I was wondering why my thermostats always seem to switch to 22° instead of 21.5° the last days and kept searching for some obscure configuration option I missed. BTW, it does not matter if I use a "." or a "," for the decimal.

jmcollin78 commented 11 months ago

Hello,

Your temperature are floating point value:

eco_temp: 21.5
boost_temp: 30
comfort_temp: 22.5

Another thing I see is that: target_temp_step: 0.5 that means your underlying climate doesn't accept 0.1 or 0.2 precision temperature.

And the last point you should see: you are in over_climate, it is possible that the self-regulation tries to adjust to the higher temp rounded to the self-regulation precision which is describe here: https://github.com/jmcollin78/versatile_thermostat/blob/main/README.md#self-regulation

The self regulation should explains that target temperature changes it self.

I don't see any regulation attributes in your attributes copy/paste but I wonder if you have any regulation activated ?

maschulze commented 11 months ago

image

In my opinion, autoregulation is not activated.

If the thermostat I'm using doesn't allow steps smaller than 0.5 °C, then it should at least be possible to set a value of 21.5 °C.

Ra72xx commented 11 months ago

I never had auto-regulation, I have thernostat-over-climate, and it worked until a few days ago (I can't say when exactly it stopped working). Now I can only use integer values for temperature. Even if I adjust the thermostat hardware manually, it gets regulated to an integer value seconds later.

maschulze commented 11 months ago

I rolled back to version 4.3.0 for testing purposes and now it works as expected again.

I can now set a target temperature of 22.5 °C again and this is maintained without any changes.

jmcollin78 commented 10 months ago

Bug found. I will release today.

jmcollin78 commented 10 months ago

Fixed in https://github.com/jmcollin78/versatile_thermostat/releases/tag/5.1.1