From 717c55d1f51fee3686e27550a95c560131d0b3c7 Mon Sep 17 00:00:00 2001 From: MatsNl <37705266+MatsNl@users.noreply.github.com> Date: Mon, 11 May 2020 11:09:43 +0200 Subject: [PATCH] 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 --- homeassistant/components/atag/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/atag/__init__.py b/homeassistant/components/atag/__init__.py index cb90df1650c..e8706593a06 100644 --- a/homeassistant/components/atag/__init__.py +++ b/homeassistant/components/atag/__init__.py @@ -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