mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Update radiotherm to 2.0.0 and handle change in tstat error detection (#19107)
* radiotherm: bump version to 2.0.0 * radiotherm: change handling of transient errors from tstat Radiotherm 2.0.0 now throws an exception when a transient error is detected, instead of returning -1 for the field where the error was detected. This change supports handling the exception.
This commit is contained in:
parent
bc8414a6f8
commit
866c2ca994
@ -17,7 +17,7 @@ from homeassistant.const import (
|
|||||||
CONF_HOST, TEMP_FAHRENHEIT, ATTR_TEMPERATURE, PRECISION_HALVES)
|
CONF_HOST, TEMP_FAHRENHEIT, ATTR_TEMPERATURE, PRECISION_HALVES)
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
|
||||||
REQUIREMENTS = ['radiotherm==1.4.1']
|
REQUIREMENTS = ['radiotherm==2.0.0']
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -235,13 +235,15 @@ class RadioThermostat(ClimateDevice):
|
|||||||
self._name = self.device.name['raw']
|
self._name = self.device.name['raw']
|
||||||
|
|
||||||
# Request the current state from the thermostat.
|
# Request the current state from the thermostat.
|
||||||
data = self.device.tstat['raw']
|
import radiotherm
|
||||||
|
try:
|
||||||
|
data = self.device.tstat['raw']
|
||||||
|
except radiotherm.validate.RadiothermTstatError:
|
||||||
|
_LOGGER.error('%s (%s) was busy (invalid value returned)',
|
||||||
|
self._name, self.device.host)
|
||||||
|
return
|
||||||
|
|
||||||
current_temp = data['temp']
|
current_temp = data['temp']
|
||||||
if current_temp == -1:
|
|
||||||
_LOGGER.error('%s (%s) was busy (temp == -1)', self._name,
|
|
||||||
self.device.host)
|
|
||||||
return
|
|
||||||
|
|
||||||
# Map thermostat values into various STATE_ flags.
|
# Map thermostat values into various STATE_ flags.
|
||||||
self._current_temperature = current_temp
|
self._current_temperature = current_temp
|
||||||
|
@ -1352,7 +1352,7 @@ quantum-gateway==0.0.3
|
|||||||
rachiopy==0.1.3
|
rachiopy==0.1.3
|
||||||
|
|
||||||
# homeassistant.components.climate.radiotherm
|
# homeassistant.components.climate.radiotherm
|
||||||
radiotherm==1.4.1
|
radiotherm==2.0.0
|
||||||
|
|
||||||
# homeassistant.components.raincloud
|
# homeassistant.components.raincloud
|
||||||
raincloudy==0.0.5
|
raincloudy==0.0.5
|
||||||
|
Loading…
x
Reference in New Issue
Block a user