bugfix evohome and bump client (#27968)

* bump client to 0.3.4b1

* handle bad schedules that cause issue #27768
This commit is contained in:
David Bonnes
2019-10-20 17:51:08 +01:00
committed by GitHub
parent 22b29a8005
commit 425e7fd1a7
3 changed files with 35 additions and 28 deletions

View File

@@ -460,6 +460,7 @@ class EvoChild(EvoDevice):
day_of_week = int(day_time.strftime("%w")) # 0 is Sunday day_of_week = int(day_time.strftime("%w")) # 0 is Sunday
time_of_day = day_time.strftime("%H:%M:%S") time_of_day = day_time.strftime("%H:%M:%S")
try:
# Iterate today's switchpoints until past the current time of day... # Iterate today's switchpoints until past the current time of day...
day = self._schedule["DailySchedules"][day_of_week] day = self._schedule["DailySchedules"][day_of_week]
sp_idx = -1 # last switchpoint of the day before sp_idx = -1 # last switchpoint of the day before
@@ -491,6 +492,12 @@ class EvoChild(EvoDevice):
except KeyError: except KeyError:
self._setpoints[f"{key}_sp_state"] = switchpoint["DhwState"] self._setpoints[f"{key}_sp_state"] = switchpoint["DhwState"]
except IndexError:
self._setpoints = {}
_LOGGER.warning(
"Failed to get setpoints - please report as an issue", exc_info=True
)
return self._setpoints return self._setpoints
async def _update_schedule(self) -> None: async def _update_schedule(self) -> None:

View File

@@ -3,7 +3,7 @@
"name": "Evohome", "name": "Evohome",
"documentation": "https://www.home-assistant.io/integrations/evohome", "documentation": "https://www.home-assistant.io/integrations/evohome",
"requirements": [ "requirements": [
"evohome-async==0.3.3b5" "evohome-async==0.3.4b1"
], ],
"dependencies": [], "dependencies": [],
"codeowners": ["@zxdavb"] "codeowners": ["@zxdavb"]

View File

@@ -480,7 +480,7 @@ eternalegypt==0.0.10
# evdev==0.6.1 # evdev==0.6.1
# homeassistant.components.evohome # homeassistant.components.evohome
evohome-async==0.3.3b5 evohome-async==0.3.4b1
# homeassistant.components.dlib_face_detect # homeassistant.components.dlib_face_detect
# homeassistant.components.dlib_face_identify # homeassistant.components.dlib_face_identify