Correctly handle failed Atag update in coordinator (#35473)

* delay loading configentry if update failed

* raise updatefailed on empty atagreply

* Update __init__.py

Co-authored-by: Boris Nelissen <borisnelissen91@gmail.com>
This commit is contained in:
MatsNlandBoris Nelissen authored and GitHub committed 2020-05-11 11:09:43 +02:00
1 parent 1e00fc2af7
commit 717c55d1f5
1 file changed
+2 -1
+2 -1
View File
@@ -163,9 +163,10 @@ class AtagDataUpdateCoordinator(DataUpdateCoordinator):
with async_timeout.timeout(20):
try:
await self.atag.async_update()
if not self.atag.sensordata:
raise UpdateFailed("No data")
except (AtagException) as error:
raise UpdateFailed(error)
return self.atag.sensordata