Small fixes, fix KeyError for switches #38

This commit is contained in:
Andre Basche 2023-05-08 19:17:08 +02:00
parent 44794c35ca
commit 240dc85ff3
6 changed files with 33 additions and 27 deletions

View file

@ -130,8 +130,8 @@ class HonClimateEntity(HonEntity, ClimateEntity):
@callback
def _handle_coordinator_update(self, update=True) -> None:
# self._attr_target_temperature = int(float(self._device.get("tempSel")))
# self._attr_current_temperature = float(self._device.get("tempIndoor"))
self._attr_target_temperature = int(float(self._device.get("tempSel")))
self._attr_current_temperature = float(self._device.get("tempIndoor"))
self._attr_max_temp = self._device.settings["settings.tempSel"].max
self._attr_min_temp = self._device.settings["settings.tempSel"].min