better_thermostat icon indicating copy to clipboard operation
better_thermostat copied to clipboard

Catch Error if Termostat is unavailable

Open StormCh opened this issue 5 months ago • 0 comments

2024-09-13 06:20:28.571 ERROR (MainThread) [custom_components.better_thermostat.utils.controlling] better_thermostat None: ERROR controlling: climate.heizung_bad_gross
Traceback (most recent call last):
  File "/config/custom_components/better_thermostat/utils/controlling.py", line 53, in control_queue
    _temp = await control_trv(self, trv)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/better_thermostat/utils/controlling.py", line 231, in control_trv
    _current_calibration_s = await get_current_offset(self, heater_entity_id)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/better_thermostat/adapters/delegate.py", line 55, in get_current_offset
    return await self.real_trvs[entity_id]["adapter"].get_current_offset(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/better_thermostat/adapters/mqtt.py", line 84, in get_current_offset
    return float(
           ^^^^^^
ValueError: could not convert string to float: 'unavailable'

Description

Please catch to type of error, this should be mandatory. Due to this log information, HA restarting every time the log file is to big

Versions

HA Version 2024.9.1 BT Version 1.6.0

StormCh avatar Sep 13 '24 06:09 StormCh