mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 09:47:52 +00:00
Fix for radiotherm component stall (#45482)
This commit is contained in:
parent
12e31b9571
commit
34f701a69b
@ -363,6 +363,7 @@ homeassistant/components/quantum_gateway/* @cisasteelersfan
|
|||||||
homeassistant/components/qvr_pro/* @oblogic7
|
homeassistant/components/qvr_pro/* @oblogic7
|
||||||
homeassistant/components/qwikswitch/* @kellerza
|
homeassistant/components/qwikswitch/* @kellerza
|
||||||
homeassistant/components/rachio/* @bdraco
|
homeassistant/components/rachio/* @bdraco
|
||||||
|
homeassistant/components/radiotherm/* @vinnyfuria
|
||||||
homeassistant/components/rainbird/* @konikvranik
|
homeassistant/components/rainbird/* @konikvranik
|
||||||
homeassistant/components/raincloud/* @vanstinator
|
homeassistant/components/raincloud/* @vanstinator
|
||||||
homeassistant/components/rainforest_eagle/* @gtdiehl @jcalbert
|
homeassistant/components/rainforest_eagle/* @gtdiehl @jcalbert
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
"""Support for Radio Thermostat wifi-enabled home thermostats."""
|
"""Support for Radio Thermostat wifi-enabled home thermostats."""
|
||||||
import logging
|
import logging
|
||||||
|
from socket import timeout
|
||||||
|
|
||||||
import radiotherm
|
import radiotherm
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
@ -261,40 +262,40 @@ class RadioThermostat(ClimateEntity):
|
|||||||
# thermostats tend to time out sometimes when they're actively
|
# thermostats tend to time out sometimes when they're actively
|
||||||
# heating or cooling.
|
# heating or cooling.
|
||||||
|
|
||||||
|
try:
|
||||||
# First time - get the name from the thermostat. This is
|
# First time - get the name from the thermostat. This is
|
||||||
# normally set in the radio thermostat web app.
|
# normally set in the radio thermostat web app.
|
||||||
if self._name is None:
|
if self._name is None:
|
||||||
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.
|
||||||
try:
|
|
||||||
data = self.device.tstat["raw"]
|
data = self.device.tstat["raw"]
|
||||||
except radiotherm.validate.RadiothermTstatError:
|
|
||||||
_LOGGER.warning(
|
|
||||||
"%s (%s) was busy (invalid value returned)",
|
|
||||||
self._name,
|
|
||||||
self.device.host,
|
|
||||||
)
|
|
||||||
return
|
|
||||||
|
|
||||||
current_temp = data["temp"]
|
|
||||||
|
|
||||||
if self._is_model_ct80:
|
if self._is_model_ct80:
|
||||||
try:
|
|
||||||
humiditydata = self.device.humidity["raw"]
|
humiditydata = self.device.humidity["raw"]
|
||||||
|
|
||||||
except radiotherm.validate.RadiothermTstatError:
|
except radiotherm.validate.RadiothermTstatError:
|
||||||
_LOGGER.warning(
|
_LOGGER.warning(
|
||||||
"%s (%s) was busy (invalid value returned)",
|
"%s (%s) was busy (invalid value returned)",
|
||||||
self._name,
|
self._name,
|
||||||
self.device.host,
|
self.device.host,
|
||||||
)
|
)
|
||||||
return
|
|
||||||
|
except timeout:
|
||||||
|
_LOGGER.warning(
|
||||||
|
"Timeout waiting for response from %s (%s)",
|
||||||
|
self._name,
|
||||||
|
self.device.host,
|
||||||
|
)
|
||||||
|
|
||||||
|
else:
|
||||||
|
if self._is_model_ct80:
|
||||||
self._current_humidity = humiditydata
|
self._current_humidity = humiditydata
|
||||||
self._program_mode = data["program_mode"]
|
self._program_mode = data["program_mode"]
|
||||||
self._preset_mode = CODE_TO_PRESET_MODE[data["program_mode"]]
|
self._preset_mode = CODE_TO_PRESET_MODE[data["program_mode"]]
|
||||||
|
|
||||||
# Map thermostat values into various STATE_ flags.
|
# Map thermostat values into various STATE_ flags.
|
||||||
self._current_temperature = current_temp
|
self._current_temperature = data["temp"]
|
||||||
self._fmode = CODE_TO_FAN_MODE[data["fmode"]]
|
self._fmode = CODE_TO_FAN_MODE[data["fmode"]]
|
||||||
self._fstate = CODE_TO_FAN_STATE[data["fstate"]]
|
self._fstate = CODE_TO_FAN_STATE[data["fstate"]]
|
||||||
self._tmode = CODE_TO_TEMP_MODE[data["tmode"]]
|
self._tmode = CODE_TO_TEMP_MODE[data["tmode"]]
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
"domain": "radiotherm",
|
"domain": "radiotherm",
|
||||||
"name": "Radio Thermostat",
|
"name": "Radio Thermostat",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/radiotherm",
|
"documentation": "https://www.home-assistant.io/integrations/radiotherm",
|
||||||
"requirements": ["radiotherm==2.0.0"],
|
"requirements": ["radiotherm==2.1.0"],
|
||||||
"codeowners": []
|
"codeowners": ["@vinnyfuria"]
|
||||||
}
|
}
|
||||||
|
@ -1913,7 +1913,7 @@ quantum-gateway==0.0.5
|
|||||||
rachiopy==1.0.3
|
rachiopy==1.0.3
|
||||||
|
|
||||||
# homeassistant.components.radiotherm
|
# homeassistant.components.radiotherm
|
||||||
radiotherm==2.0.0
|
radiotherm==2.1.0
|
||||||
|
|
||||||
# homeassistant.components.raincloud
|
# homeassistant.components.raincloud
|
||||||
raincloudy==0.0.7
|
raincloudy==0.0.7
|
||||||
|
Loading…
x
Reference in New Issue
Block a user