versatile_thermostat: radiator valve stuck in loop ("changed to heat / turned off / … triggered by service Climate: Set HVAC mode") until HA reboot

Version of the custom_component

I’m running the latest VTherm version 3.5.2, all other integrations and HA have no available updates either.

Configuration

climate.schlafzimmer_eve_trv (the underlying radiator valve controlled by versatile thermostat):

hvac_modes:
  - 'off'
  - heat
min_temp: 7
max_temp: 35
current_temperature: 19.5
temperature: null
hvac_action: idle
friendly_name: Schlafzimmer Eve TRV
supported_features: 1

climate.schlafzimmer_heizung (the versatile thermostat service):

hvac_modes:
  - 'off'
  - heat
min_temp: 16
max_temp: 26
preset_modes:
  - none
  - eco
  - comfort
  - boost
current_temperature: 21.5
temperature: 17
hvac_action: idle
preset_mode: eco
hvac_mode: 'off'
type: thermostat_over_climate
eco_temp: 19
boost_temp: 21
comfort_temp: 20
eco_away_temp: 17
boost_away_temp: 19
comfort_away_temp: 18
power_temp: null
target_temp: 17
current_temp: 21.5
ext_current_temperature: 12.6000032424927
current_power: null
current_power_max: null
saved_preset_mode: eco
saved_target_temp: 19
saved_hvac_mode: null
window_state: null
motion_state: null
overpowering_state: null
presence_state: 'off'
window_auto_state: false
security_delay_min: 60
security_min_on_percent: 0.5
security_default_on_percent: 0.1
last_temperature_datetime: '2023-10-12T08:57:12.562924+02:00'
last_ext_temperature_datetime: '2023-10-12T08:51:55.650098+02:00'
security_state: false
minimal_activation_delay_sec: 10
device_power: 1
mean_cycle_power: null
total_energy: 0.10959254972222225
last_update_datetime: '2023-10-12T08:57:12.569348+02:00'
timezone: Europe/Vienna
window_delay_sec: 30
window_auto_open_threshold: 0.05
window_auto_close_threshold: 0
window_auto_max_duration: 60
underlying_climate_1: null
underlying_climate_2: null
underlying_climate_3: null
start_hvac_action_date: null
friendly_name: Schlafzimmer Heizung
supported_features: 17

Describe the bug

After creating a Virtual Thermostat for a Eve Thermo Homekit Device and a simple thermostat lovelace card, when switching the preset in the UI the thermostat valve started turning on/off/on/off/on/off as fast as it could, until its battery was nearly empty and I rebooted HA. Other than the reboot of HA I couldn’t find anything to stop this loop.

As this happened to me a week ago with a different virtual thermostat, this seems to be a more frequent issue than initially expected, at least in my setup.

Here’s everything I could find that might be relevant to debugging the issue. I might be able to reproduce it, it was just a very bad timing when it happened.

Debug log

Logbook of the VTherm device:

Schlafzimmer Heizung  turned off
23:11:50 - 10 hours ago

Schlafzimmer Heizung  changed to Heat
23:11:49 - 10 hours ago

Schlafzimmer Heizung  turned off
23:11:49 - 10 hours ago

Schlafzimmer Heizung  changed to Heat
23:11:49 - 10 hours ago

Schlafzimmer Heizung  turned off
23:11:48 - 10 hours ago

Schlafzimmer Heizung  changed to Heat
23:11:48 - 10 hours ago

Schlafzimmer Heizung  turned off
23:11:47 - 10 hours ago

Schlafzimmer Heizung  changed to Heat
23:11:47 - 10 hours ago

Schlafzimmer Heizung  turned off
23:11:46 - 10 hours ago

Schlafzimmer Heizung  changed to Heat
23:11:46 - 10 hours ago

Schlafzimmer Heizung  turned off
23:11:46 - 10 hours ago

Schlafzimmer Heizung  changed to Heat
23:11:45 - 10 hours ago

Logbook of the underlying Eve Thermo TRV (thermostatic radiator valve):

Schlafzimmer Eve TRV  changed to Heat triggered by service Climate: Set HVAC mode
23:11:56 - 10 hours ago

Schlafzimmer Eve TRV  turned off triggered by service Climate: Set HVAC mode
23:11:56 - 10 hours ago

Schlafzimmer Eve TRV  changed to Heat triggered by service Climate: Set HVAC mode
23:11:55 - 10 hours ago

Schlafzimmer Eve TRV  turned off triggered by service Climate: Set HVAC mode
23:11:55 - 10 hours ago

Schlafzimmer Eve TRV  changed to Heat triggered by service Climate: Set HVAC mode
23:11:54 - 10 hours ago

Schlafzimmer Eve TRV  turned off triggered by service Climate: Set HVAC mode
23:11:54 - 10 hours ago

Schlafzimmer Eve TRV  changed to Heat triggered by service Climate: Set HVAC mode
23:11:54 - 10 hours ago

Schlafzimmer Eve TRV  turned off triggered by service Climate: Set HVAC mode
23:11:53 - 10 hours ago

Schlafzimmer Eve TRV  changed to Heat triggered by service Climate: Set HVAC mode
23:11:53 - 10 hours ago

Versatile Thermostat debug log while the TRV turned on and off constantly (I can provide more if necessary):

2023-10-11 23:05:00.323 DEBUG (MainThread) [custom_components.versatile_thermostat.climate] VersatileThermostat-Schlafzimmer Heizung - Checking new cycle. hvac_mode=off, security_state=False, preset_mode=eco
2023-10-11 23:05:00.323 DEBUG (MainThread) [custom_components.versatile_thermostat.climate] VersatileThermostat-Schlafzimmer Heizung - power not configured. check_overpowering not available
2023-10-11 23:05:00.323 DEBUG (MainThread) [custom_components.versatile_thermostat.climate] VersatileThermostat-Schlafzimmer Heizung - checking security delta_temp=2.2 delta_ext_temp=2.2 mod_cond=False temp_cond=False climate_cond=False switch_cond=False
2023-10-11 23:05:00.323 DEBUG (MainThread) [custom_components.versatile_thermostat.climate] VersatileThermostat-Schlafzimmer Heizung - End of cycle (HVAC_MODE_OFF)
2023-10-11 23:05:00.335 DEBUG (MainThread) [custom_components.versatile_thermostat.binary_sensor] Schlafzimmer Heizung_security_state - climate state change
2023-10-11 23:05:00.335 DEBUG (MainThread) [custom_components.versatile_thermostat.binary_sensor] Schlafzimmer Heizung_window_state - climate state change
2023-10-11 23:05:00.335 DEBUG (MainThread) [custom_components.versatile_thermostat.binary_sensor] Schlafzimmer Heizung_presence_state - climate state change
2023-10-11 23:05:00.335 DEBUG (MainThread) [custom_components.versatile_thermostat.sensor] Schlafzimmer Heizung_last_temp_datetime - climate state change
2023-10-11 23:05:00.335 DEBUG (MainThread) [custom_components.versatile_thermostat.sensor] Schlafzimmer Heizung_last_ext_temp_datetime - climate state change
2023-10-11 23:05:00.335 DEBUG (MainThread) [custom_components.versatile_thermostat.sensor] Schlafzimmer Heizung_temperature_slope - climate state change
2023-10-11 23:05:00.336 DEBUG (MainThread) [custom_components.versatile_thermostat.sensor] Schlafzimmer Heizung_energy - climate state change
2023-10-11 23:05:00.336 DEBUG (MainThread) [custom_components.versatile_thermostat.binary_sensor] Schlafzimmer Heizung_security_state - climate state change
2023-10-11 23:05:00.336 DEBUG (MainThread) [custom_components.versatile_thermostat.binary_sensor] Schlafzimmer Heizung_window_state - climate state change
2023-10-11 23:05:00.336 DEBUG (MainThread) [custom_components.versatile_thermostat.binary_sensor] Schlafzimmer Heizung_presence_state - climate state change
2023-10-11 23:05:00.336 DEBUG (MainThread) [custom_components.versatile_thermostat.sensor] Schlafzimmer Heizung_last_temp_datetime - climate state change
2023-10-11 23:05:00.336 DEBUG (MainThread) [custom_components.versatile_thermostat.sensor] Schlafzimmer Heizung_last_ext_temp_datetime - climate state change
2023-10-11 23:05:00.336 DEBUG (MainThread) [custom_components.versatile_thermostat.sensor] Schlafzimmer Heizung_temperature_slope - climate state change
2023-10-11 23:05:00.336 DEBUG (MainThread) [custom_components.versatile_thermostat.sensor] Schlafzimmer Heizung_energy - climate state change
2023-10-11 23:05:00.733 DEBUG (MainThread) [custom_components.versatile_thermostat.climate] VersatileThermostat-Schlafzimmer Heizung - _async_climate_changed new_state is <state climate.schlafzimmer_eve_trv=heat; hvac_modes=[<HVACMode.OFF: 'off'>, <HVACMode.HEAT: 'heat'>], min_temp=10.0, max_temp=30.0, current_temperature=22.0, temperature=19.0, hvac_action=idle, friendly_name=Schlafzimmer Eve TRV, supported_features=1 @ 2023-10-11T23:05:00.728319+02:00>
2023-10-11 23:05:00.734 INFO (MainThread) [custom_components.versatile_thermostat.climate] VersatileThermostat-Schlafzimmer Heizung - Underlying climate changed. Event.new_hvac_mode is heat, current_hvac_mode=off, new_hvac_action=idle, old_hvac_action=idle
2023-10-11 23:05:00.738 DEBUG (MainThread) [custom_components.versatile_thermostat.climate] VersatileThermostat-Schlafzimmer Heizung - Calling update_custom_attributes: {'hvac_mode': 'heat', 'preset_mode': 'eco', 'type': 'thermostat_over_climate', 'eco_temp': 19.0, 'boost_temp': 21.0, 'comfort_temp': 20.0, 'eco_away_temp': 17.0, 'boost_away_temp': 19.0, 'comfort_away_temp': 18.0, 'power_temp': None, 'target_temp': 19.0, 'current_temp': 21.8, 'ext_current_temperature': 15.8999996185303, 'current_power': None, 'current_power_max': None, 'saved_preset_mode': 'eco', 'saved_target_temp': 16.0, 'saved_hvac_mode': None, 'window_state': None, 'motion_state': None, 'overpowering_state': None, 'presence_state': 'on', 'window_auto_state': False, 'security_delay_min': 60, 'security_min_on_percent': 0.5, 'security_default_on_percent': 0.1, 'last_temperature_datetime': '2023-10-11T23:02:50.476466+02:00', 'last_ext_temperature_datetime': '2023-10-11T23:02:50.476466+02:00', 'security_state': False, 'minimal_activation_delay_sec': 10, 'device_power': 1.0, 'mean_cycle_power': None, 'total_energy': 0.08410617944444447, 'last_update_datetime': '2023-10-11T23:05:00.737087+02:00', 'timezone': 'Europe/Vienna', 'window_delay_sec': 30, 'window_auto_open_threshold': 0.05, 'window_auto_close_threshold': 0.0, 'window_auto_max_duration': 60, 'underlying_climate_1': None, 'underlying_climate_2': None, 'underlying_climate_3': None, 'start_hvac_action_date': None}
2023-10-11 23:05:00.744 DEBUG (MainThread) [custom_components.versatile_thermostat.climate] VersatileThermostat-Schlafzimmer Heizung - Checking new cycle. hvac_mode=heat, security_state=False, preset_mode=eco
2023-10-11 23:05:00.744 DEBUG (MainThread) [custom_components.versatile_thermostat.climate] VersatileThermostat-Schlafzimmer Heizung - power not configured. check_overpowering not available
2023-10-11 23:05:00.744 DEBUG (MainThread) [custom_components.versatile_thermostat.climate] VersatileThermostat-Schlafzimmer Heizung - checking security delta_temp=2.2 delta_ext_temp=2.2 mod_cond=True temp_cond=False climate_cond=False switch_cond=False
2023-10-11 23:05:00.745 DEBUG (MainThread) [custom_components.versatile_thermostat.climate] VersatileThermostat-Schlafzimmer Heizung - Calling update_custom_attributes: {'hvac_mode': 'heat', 'preset_mode': 'eco', 'type': 'thermostat_over_climate', 'eco_temp': 19.0, 'boost_temp': 21.0, 'comfort_temp': 20.0, 'eco_away_temp': 17.0, 'boost_away_temp': 19.0, 'comfort_away_temp': 18.0, 'power_temp': None, 'target_temp': 19.0, 'current_temp': 21.8, 'ext_current_temperature': 15.8999996185303, 'current_power': None, 'current_power_max': None, 'saved_preset_mode': 'eco', 'saved_target_temp': 16.0, 'saved_hvac_mode': None, 'window_state': None, 'motion_state': None, 'overpowering_state': None, 'presence_state': 'on', 'window_auto_state': False, 'security_delay_min': 60, 'security_min_on_percent': 0.5, 'security_default_on_percent': 0.1, 'last_temperature_datetime': '2023-10-11T23:02:50.476466+02:00', 'last_ext_temperature_datetime': '2023-10-11T23:02:50.476466+02:00', 'security_state': False, 'minimal_activation_delay_sec': 10, 'device_power': 1.0, 'mean_cycle_power': None, 'total_energy': 0.08410617944444447, 'last_update_datetime': '2023-10-11T23:05:00.745028+02:00', 'timezone': 'Europe/Vienna', 'window_delay_sec': 30, 'window_auto_open_threshold': 0.05, 'window_auto_close_threshold': 0.0, 'window_auto_max_duration': 60, 'underlying_climate_1': None, 'underlying_climate_2': None, 'underlying_climate_3': None, 'start_hvac_action_date': None}
2023-10-11 23:05:00.760 DEBUG (MainThread) [custom_components.versatile_thermostat.binary_sensor] Schlafzimmer Heizung_security_state - climate state change
2023-10-11 23:05:00.760 DEBUG (MainThread) [custom_components.versatile_thermostat.binary_sensor] Schlafzimmer Heizung_window_state - climate state change
2023-10-11 23:05:00.760 DEBUG (MainThread) [custom_components.versatile_thermostat.binary_sensor] Schlafzimmer Heizung_presence_state - climate state change
2023-10-11 23:05:00.760 DEBUG (MainThread) [custom_components.versatile_thermostat.sensor] Schlafzimmer Heizung_last_temp_datetime - climate state change
2023-10-11 23:05:00.761 DEBUG (MainThread) [custom_components.versatile_thermostat.sensor] Schlafzimmer Heizung_last_ext_temp_datetime - climate state change
2023-10-11 23:05:00.761 DEBUG (MainThread) [custom_components.versatile_thermostat.sensor] Schlafzimmer Heizung_temperature_slope - climate state change
2023-10-11 23:05:00.761 DEBUG (MainThread) [custom_components.versatile_thermostat.sensor] Schlafzimmer Heizung_energy - climate state change
2023-10-11 23:05:00.761 DEBUG (MainThread) [custom_components.versatile_thermostat.binary_sensor] Schlafzimmer Heizung_security_state - climate state change
2023-10-11 23:05:00.761 DEBUG (MainThread) [custom_components.versatile_thermostat.binary_sensor] Schlafzimmer Heizung_window_state - climate state change
2023-10-11 23:05:00.761 DEBUG (MainThread) [custom_components.versatile_thermostat.binary_sensor] Schlafzimmer Heizung_presence_state - climate state change
2023-10-11 23:05:00.761 DEBUG (MainThread) [custom_components.versatile_thermostat.sensor] Schlafzimmer Heizung_last_temp_datetime - climate state change
2023-10-11 23:05:00.761 DEBUG (MainThread) [custom_components.versatile_thermostat.sensor] Schlafzimmer Heizung_last_ext_temp_datetime - climate state change
2023-10-11 23:05:00.761 DEBUG (MainThread) [custom_components.versatile_thermostat.sensor] Schlafzimmer Heizung_temperature_slope - climate state change
2023-10-11 23:05:00.762 DEBUG (MainThread) [custom_components.versatile_thermostat.sensor] Schlafzimmer Heizung_energy - climate state change
2023-10-11 23:05:00.762 DEBUG (MainThread) [custom_components.versatile_thermostat.binary_sensor] Schlafzimmer Heizung_security_state - climate state change
2023-10-11 23:05:00.762 DEBUG (MainThread) [custom_components.versatile_thermostat.binary_sensor] Schlafzimmer Heizung_window_state - climate state change
2023-10-11 23:05:00.762 DEBUG (MainThread) [custom_components.versatile_thermostat.binary_sensor] Schlafzimmer Heizung_presence_state - climate state change
2023-10-11 23:05:00.762 DEBUG (MainThread) [custom_components.versatile_thermostat.sensor] Schlafzimmer Heizung_last_temp_datetime - climate state change
2023-10-11 23:05:00.762 DEBUG (MainThread) [custom_components.versatile_thermostat.sensor] Schlafzimmer Heizung_last_ext_temp_datetime - climate state change
2023-10-11 23:05:00.762 DEBUG (MainThread) [custom_components.versatile_thermostat.sensor] Schlafzimmer Heizung_temperature_slope - climate state change
2023-10-11 23:05:00.762 DEBUG (MainThread) [custom_components.versatile_thermostat.sensor] Schlafzimmer Heizung_energy - climate state change
2023-10-11 23:05:01.135 DEBUG (MainThread) [custom_components.versatile_thermostat.climate] VersatileThermostat-Schlafzimmer Heizung - _async_climate_changed new_state is <state climate.schlafzimmer_eve_trv=off; hvac_modes=[<HVACMode.OFF: 'off'>, <HVACMode.HEAT: 'heat'>], min_temp=7, max_temp=35, current_temperature=22.0, temperature=None, hvac_action=idle, friendly_name=Schlafzimmer Eve TRV, supported_features=1 @ 2023-10-11T23:05:01.129526+02:00>
2023-10-11 23:05:01.136 INFO (MainThread) [custom_components.versatile_thermostat.climate] VersatileThermostat-Schlafzimmer Heizung - Underlying climate changed. Event.new_hvac_mode is off, current_hvac_mode=heat, new_hvac_action=idle, old_hvac_action=idle
2023-10-11 23:05:01.140 DEBUG (MainThread) [custom_components.versatile_thermostat.climate] VersatileThermostat-Schlafzimmer Heizung - Calling update_custom_attributes: {'hvac_mode': 'off', 'preset_mode': 'eco', 'type': 'thermostat_over_climate', 'eco_temp': 19.0, 'boost_temp': 21.0, 'comfort_temp': 20.0, 'eco_away_temp': 17.0, 'boost_away_temp': 19.0, 'comfort_away_temp': 18.0, 'power_temp': None, 'target_temp': 19.0, 'current_temp': 21.8, 'ext_current_temperature': 15.8999996185303, 'current_power': None, 'current_power_max': None, 'saved_preset_mode': 'eco', 'saved_target_temp': 16.0, 'saved_hvac_mode': None, 'window_state': None, 'motion_state': None, 'overpowering_state': None, 'presence_state': 'on', 'window_auto_state': False, 'security_delay_min': 60, 'security_min_on_percent': 0.5, 'security_default_on_percent': 0.1, 'last_temperature_datetime': '2023-10-11T23:02:50.476466+02:00', 'last_ext_temperature_datetime': '2023-10-11T23:02:50.476466+02:00', 'security_state': False, 'minimal_activation_delay_sec': 10, 'device_power': 1.0, 'mean_cycle_power': None, 'total_energy': 0.08410617944444447, 'last_update_datetime': '2023-10-11T23:05:01.138469+02:00', 'timezone': 'Europe/Vienna', 'window_delay_sec': 30, 'window_auto_open_threshold': 0.05, 'window_auto_close_threshold': 0.0, 'window_auto_max_duration': 60, 'underlying_climate_1': None, 'underlying_climate_2': None, 'underlying_climate_3': None, 'start_hvac_action_date': None}

Homekit Device debug log (one cycle, this continues endlessly too)

2023-10-11 23:05:56.846 DEBUG (MainThread) [aiohomekit.controller.ble.client] Queuing fragment for write: b'\x00\x02j.\x00\x03\x00\x01\x01\x01'
2023-10-11 23:05:56.846 DEBUG (MainThread) [aiohomekit.controller.ble.client] Writing fragment: b'\x82\xca{\x8b\xfc_\x04\x0e9}>\x1f\x92B\xe4\xa2\xf7\x8c[{\x7f\xd9\x17\xd2\xbf\xc3'
2023-10-11 23:05:57.252 DEBUG (MainThread) [aiohomekit.controller.ble.client] Read fragment: b'\x02j\x00'
2023-10-11 23:05:57.252 DEBUG (MainThread) [aiohomekit.pdu] Got PDU 2: TID 6a (Expected: 6a), Status:0, Len:-2 - b'\x02j\x00'
2023-10-11 23:05:57.253 DEBUG (MainThread) [aiohomekit.controller.abstract] callback ev:{(1, 46): {'value': 1}}
2023-10-11 23:05:57.253 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Called async_set_available_state with True for C3:DC:05:F4:16:2C
2023-10-11 23:05:57.255 DEBUG (MainThread) [aiohomekit.controller.ble.pairing] Eve Thermo 1E71 [E0:77:D3:8A:FD:2E] (id=C3:DC:05:F4:16:2C): Finished put_characteristics, checking for subscription restore: False
2023-10-11 23:05:57.262 DEBUG (MainThread) [aiohomekit.controller.ble.pairing] Eve Thermo 1E71 [E0:77:D3:8A:FD:2E] (id=C3:DC:05:F4:16:2C): Populating accessories and characteristics: made_connection=False restore_pending=False
2023-10-11 23:05:57.262 DEBUG (MainThread) [aiohomekit.controller.ble.pairing] Eve Thermo 1E71 [E0:77:D3:8A:FD:2E] (id=C3:DC:05:F4:16:2C): Writing characteristics: [(1, 46, 0)]; rssi=-84
2023-10-11 23:05:57.262 DEBUG (MainThread) [aiohomekit.controller.ble.pairing] Eve Thermo 1E71 [E0:77:D3:8A:FD:2E] (id=C3:DC:05:F4:16:2C): Writing characteristics: iid=46 value=0
2023-10-11 23:05:57.263 DEBUG (MainThread) [aiohomekit.protocol.tlv] sending [
  1 (Identifier): (1 bytes/<class 'bytes'>) b'\x00'
]

2023-10-11 23:05:57.263 DEBUG (MainThread) [aiohomekit.controller.ble.client] Queuing fragment for write: b'\x00\x02\xe5.\x00\x03\x00\x01\x01\x00'
2023-10-11 23:05:57.264 DEBUG (MainThread) [aiohomekit.controller.ble.client] Writing fragment: b'\xd9\x90\xdc\xf8\x939\x8a>E\xe8\xb6\x90\xeaP8\xa2\xca3Z\xf5\xa4\xdb\x1a\xe0\t,'
2023-10-11 23:05:57.652 DEBUG (MainThread) [aiohomekit.controller.ble.client] Read fragment: b'\x02\xe5\x00'
2023-10-11 23:05:57.652 DEBUG (MainThread) [aiohomekit.pdu] Got PDU 2: TID e5 (Expected: e5), Status:0, Len:-2 - b'\x02\xe5\x00'
2023-10-11 23:05:57.652 DEBUG (MainThread) [aiohomekit.controller.abstract] callback ev:{(1, 46): {'value': 0}}
2023-10-11 23:05:57.653 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Called async_set_available_state with True for C3:DC:05:F4:16:2C
2023-10-11 23:05:57.654 DEBUG (MainThread) [aiohomekit.controller.ble.pairing] Eve Thermo 1E71 [E0:77:D3:8A:FD:2E] (id=C3:DC:05:F4:16:2C): Finished put_characteristics, checking for subscription restore: False
2023-10-11 23:05:57.658 DEBUG (MainThread) [aiohomekit.controller.ble.pairing] Eve Thermo 1E71 [E0:77:D3:8A:FD:2E] (id=C3:DC:05:F4:16:2C): Populating accessories and characteristics: made_connection=False restore_pending=False
2023-10-11 23:05:57.659 DEBUG (MainThread) [aiohomekit.controller.ble.pairing] Eve Thermo 1E71 [E0:77:D3:8A:FD:2E] (id=C3:DC:05:F4:16:2C): Writing characteristics: [(1, 46, 1)]; rssi=-84
2023-10-11 23:05:57.659 DEBUG (MainThread) [aiohomekit.controller.ble.pairing] Eve Thermo 1E71 [E0:77:D3:8A:FD:2E] (id=C3:DC:05:F4:16:2C): Writing characteristics: iid=46 value=1
2023-10-11 23:05:57.659 DEBUG (MainThread) [aiohomekit.protocol.tlv] sending [
  1 (Identifier): (1 bytes/<class 'bytes'>) b'\x01'
]

TRV configuration

# (…)
"devices": [
      {
        "name": "Eve Thermo 1E71",
        "model": "Eve Thermo 20EBP1701",
        "manfacturer": "Eve Systems",
        "sw_version": "2.1.3",
        "hw_version": "1.1",
        "entities": [
          {
            "original_name": "Eve Thermo 1E71",
            "original_device_class": null,
            "entity_category": null,
            "original_icon": null,
            "icon": null,
            "unit_of_measurement": null,
            "device_class": null,
            "disabled": false,
            "disabled_by": null,
            "state": {
              "entity_id": "climate.schlafzimmer_eve_trv",
              "state": "off",
              "attributes": {
                "hvac_modes": [
                  "off",
                  "heat"
                ],
                "min_temp": 7,
                "max_temp": 35,
                "current_temperature": 19.5,
                "temperature": null,
                "hvac_action": "idle",
                "friendly_name": "Schlafzimmer Eve TRV",
                "supported_features": 1
              },
              "last_changed": "2023-10-11T21:12:42.350486+00:00",
              "last_updated": "2023-10-12T06:00:25.587862+00:00"
            }
          },
# (…)

About this issue

  • Original URL
  • State: closed
  • Created 9 months ago
  • Comments: 29 (14 by maintainers)

Commits related to this issue

Most upvoted comments

I just push the release ! 3.5.3 which officialize the fix.&

Thnak for the beer, I really appreciate. Cheers from France !

Great news: I cannot reproduce the issue anymore. Jean-Marc, thanks a lot for all your work. (I’ve actually bought you some beers a few days ago, I’m seeing a transaction on my Apple Pay, but you didn’t receive it. The support team is looking into what happened and will hopefully fix it on Monday)

Just q auick first “thumbs up”: I had no time to enable and look into the logs, but “my error” seems not to occur anymore with the beta version.

Here’s a log with debug set for the integration and info for everything else. It’s a minute long. Until about 15:55:22 I manually clicked and changed the target temp and switched heat/off a few times, then the loop started. Near the end of the log I disabled the underlying TRV: VTherm loop 231014.log

Ok, I got exactly the case (for @maia at least). This is a side effect of the #101 issue and the #113 issue that were released in the last version when the response of the underlying is slow.

The scenario is the following:

  1. the user change target temperature, let says 20°,
  2. the VTherm inform all underlying that the new target is 20° (#113),
  3. the user change target temperature one again, let says 21°,
  4. the VTherm inform all underlying that the new target is 21° (#113),
  5. the underlying response to first change saying that internal target temp is now 20°,
  6. then VTherm inform all underlying that the new target is 20° (#101),
  7. the underlying response to 2nd change saying that internal target temp is now 21°,
  8. then VTherm inform all underlying that the new target is 21° (#101),
  9. response to the 6 (set to 20°),

If response of the underlying is instantaneous, you don’t have this effect because the target temp of the underlying is equal to the target temp of the VTherm and nothing is done by VTherm.

Fixing this is tricky (without removing #110). I will to see with your logs if i can ignore the target of underlying when a manuel change have been made after. I’m sure I will have all the dates to do that.

In my case I can reproduce the behavior (if it’s the same) when clicking my Aqara Thermostat directly on the hardware 3x in a row, which is the sequence used to start a valve calibration. Seemingly this three fast clicks are interpreted somehow by VT and cause confustion.

Hmm, well clicking 6x in 3 seconds happens when you see the thermo is set to 21°C, you decide you want it warmer, so you click 3x the “+” to 22,5°C, then decide that it’s a waste of energy and you’ll revert back to 21°C, so you click 3x the “-”. Boom, 6 clicks in 3 seconds.

(And as mentioned, when doing this directly on the hardware itself or on the HA underlying thermostat device, it’s not an issue. Only when doing this in the VTherm device it is an issue.

Thanks for looking into it!

Update, I think I can now reproduce the issue: The loop starts when changing the target temperature, the preset or the heating/off switch “too fast” in the control of the versatile thermostat device…

This will definitively helps me to reproduce to case (+ the logs)

Here’s a 900KB debug log of about 45 seconds time with a stuck loop which I triggered by quickly changing the temperature as described above. It has 137 occurrences of “Checking new cycle”, so 2-3 cycles per second: vtherm debug 231013.log.

Update, I think I can now reproduce the issue: The loop starts when changing the target temperature, the preset or the heating/off switch “too fast” in the control of the versatile thermostat device.

It doesn’t matter if I make the changes from a simple-thermostat card, from the lovelace UI or from the integration device overview. As soon as I make about 5 changes within 2-3 seconds, the loop starts. The loop can be stopped by disabling the underlying TRV device and reenabling it.

When making the same changes in the underlying TRV device, the problem does not appear. Only when making too many quick changes in the versatile thermostat device, the loop starts.

From my testing, it makes little difference if I change the preset, turn the binary heat/off switch on/off or change the temperature. After clicking a few times (like pressing “+” five times in a row to go from target temp 22,0° to 22.5° and then pressing “-” again for 3 times to go back to 21,0°) the loop begins, e.g.:

  • VTherm is on, preset manual, target temp 20,0°C
  • click + 5 times to change target temp to 22,5°C
  • click - 3 times to change target temp to 21,0°C
  • click + 2 times to change target temp to 22,0°C
  • click - 2 times to change target temp to 21,0°C

I think that whenever the TRV is still changing the valve position to switch to the new target temp, it will get stuck when you already change it to another target temp. But I have no explanation why this is only an issue when controlling it via VTherm. There is no problem when making exactly the same changes from the underlying Eve Thermo TRV device.

Neither the thermostatic valve nor the VTherm device are currently exported to Apple Homekit, so excluding them will most likely not help. As mentioned, here is my setup:

  1. Factory reset a Eve Thermo TRV
  2. Add it to Home Assistant
  3. Create a Virtual Thermostat device for this TRV
  4. Add the Virtual Thermostat device to scheduler-component
  5. Add a simple thermostat card for the VTherm device

That’s all I did, and as soon as I tried to change the preset/temperature from the lovelace UI, the on/off loop started.