Repository navigation
Title: ValueError: Unsupported HVAC mode: unavailable when underlying climate entity becomes temporarily unavailable #1223
Replies: 1 comment
|
You already have done an issue for this. Please don't open twice the same issue, it makes me the double of works. Thank you |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hello,
I'm experiencing a recurring error in the latest version of Versatile Thermostat. The error occurs when my underlying climate entities (Shelly BLU TRV via MQTT) temporarily lose BLE connection and report unavailable state.
Environment:
Home Assistant: 2024.11.x
Versatile Thermostat: [latest version from HACS]
Underlying devices: Shelly BLU TRV (climate entities via MQTT)
Error:
Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File "/config/custom_components/versatile_thermostat/thermostat_climate.py", line 596, in _async_climate_changed
new_hvac_mode = VThermHvacMode(new_state.state)
File "/config/custom_components/versatile_thermostat/vtherm_hvac_mode.py", line 40, in init
raise ValueError(f"Unsupported HVAC mode: {hvac_mode}")
ValueError: Unsupported HVAC mode: unavailable
What happens:
When my Shelly BLU TRV devices temporarily lose BLE connection, they report state as unavailable. VTherm tries to convert this string to a HVAC mode in the _async_climate_changed callback, which causes the ValueError.
Steps to reproduce:
Configure VTherm in "over_climate" mode with Shelly BLU TRV (or any BLE device that can temporarily lose connection)
Wait for underlying climate entity to become unavailable (BLE connection loss)
Error occurs in logs
What I tried:
Updated to latest version - error persists
Complete reinstallation - same error
This error did NOT occur in previous versions
Expected behavior:
VTherm should gracefully handle unavailable state of underlying climate entities without throwing an exception, either by:
Ignoring state changes when state is unavailable
Maintaining last known valid HVAC mode
Adding unavailable to supported states in VThermHvacMode
Additional context:
The error is not critical - thermostats continue to work normally after the underlying device reconnects. However, it fills the logs and may indicate a potential issue with state management.
All reactions