Skip to content

Commit

Permalink
fix climate status
Browse files Browse the repository at this point in the history
  • Loading branch information
CyrilP committed May 14, 2024
1 parent fd1f19d commit 99533ab
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions custom_components/deltadore_tydom/ha_entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,10 +696,13 @@ def temperature_unit(self) -> str:
@property
def hvac_mode(self) -> HVACMode:
"""Return the current operation (e.g. heat, cool, idle)."""
if (hasattr(self._device, 'hvacMode')):
if hasattr(self._device, 'hvacMode'):
LOGGER.debug("hvac_mode = %s", self.DICT_MODES_DD_TO_HA[self._device.hvacMode])
return self.DICT_MODES_DD_TO_HA[self._device.hvacMode]
elif (hasattr(self._device, 'thermicLevel')):
elif hasattr(self._device, 'authorization'):
LOGGER.debug("authorization = %s", self.DICT_MODES_DD_TO_HA[self._device.thermicLevel])
return self.DICT_MODES_DD_TO_HA[self._device.authorization]
elif hasattr(self._device, 'thermicLevel'):
LOGGER.debug("thermicLevel = %s", self.DICT_MODES_DD_TO_HA[self._device.thermicLevel])
return self.DICT_MODES_DD_TO_HA[self._device.thermicLevel]
else:
Expand Down

0 comments on commit 99533ab

Please sign in to comment.