Add radiotherm CT80 current humidity support (#25024)
* Added CT80 Current Humidity Support Added a check for if device is a CT80, and if so, queries the humidity object to get the current measured humidity reading. * Update climate.py Removed whitespace on line 229 * Update climate.py Added humidity property. Version on local machine had that from previous tinkering. * Update climate.py Removed whitespace * Update climate.py Fixed tstat error handling for humidity data.
This commit is contained in:
parent
5be695c49c
commit
c5239c6176
1 changed files with 16 additions and 0 deletions
|
@ -102,6 +102,7 @@ class RadioThermostat(ClimateDevice):
|
|||
self.device = device
|
||||
self._target_temperature = None
|
||||
self._current_temperature = None
|
||||
self._current_humidity = None
|
||||
self._current_operation = HVAC_MODE_OFF
|
||||
self._name = None
|
||||
self._fmode = None
|
||||
|
@ -176,6 +177,11 @@ class RadioThermostat(ClimateDevice):
|
|||
"""Return the current temperature."""
|
||||
return self._current_temperature
|
||||
|
||||
@property
|
||||
def current_humidity(self):
|
||||
"""Return the current temperature."""
|
||||
return self._current_humidity
|
||||
|
||||
@property
|
||||
def hvac_mode(self):
|
||||
"""Return the current operation. head, cool idle."""
|
||||
|
@ -216,6 +222,16 @@ class RadioThermostat(ClimateDevice):
|
|||
|
||||
current_temp = data['temp']
|
||||
|
||||
if self._is_model_ct80:
|
||||
try:
|
||||
humiditydata = self.device.tstat.humidity['raw']
|
||||
except radiotherm.validate.RadiothermTstatError:
|
||||
_LOGGER.warning('%s (%s) was busy (invalid value returned)',
|
||||
self._name, self.device.host)
|
||||
return
|
||||
current_humidity = humiditydata['humidity']
|
||||
self._current_humidity = current_humidity
|
||||
|
||||
# Map thermostat values into various STATE_ flags.
|
||||
self._current_temperature = current_temp
|
||||
self._fmode = CODE_TO_FAN_MODE[data['fmode']]
|
||||
|
|
Loading…
Add table
Reference in a new issue