mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
HM-CC-TC was not recognized (#26623)
* HM-CC-TC was not recognized * guard instead of exception
This commit is contained in:
parent
ad9daa922b
commit
2c80ce3195
@ -94,7 +94,9 @@ class HMThermostat(HMDevice, ClimateDevice):
|
||||
if self._data.get("BOOST_MODE", False):
|
||||
return "boost"
|
||||
|
||||
# Get the name of the mode
|
||||
if not self._hm_control_mode:
|
||||
return None
|
||||
|
||||
mode = HM_ATTRIBUTE_SUPPORT[HM_CONTROL_MODE][1][self._hm_control_mode]
|
||||
mode = mode.lower()
|
||||
|
||||
@ -177,8 +179,9 @@ class HMThermostat(HMDevice, ClimateDevice):
|
||||
"""Return Control mode."""
|
||||
if HMIP_CONTROL_MODE in self._data:
|
||||
return self._data[HMIP_CONTROL_MODE]
|
||||
|
||||
# Homematic
|
||||
return self._data["CONTROL_MODE"]
|
||||
return self._data.get("CONTROL_MODE")
|
||||
|
||||
def _init_data_struct(self):
|
||||
"""Generate a data dict (self._data) from the Homematic metadata."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user