From e114ae9b53574e3ca1e5a979465c3b667d75956c Mon Sep 17 00:00:00 2001 From: Erik Eriksson <8228319+molobrakos@users.noreply.github.com> Date: Wed, 17 Apr 2019 15:00:57 +0200 Subject: [PATCH] catch asyncio.TimeoutError (#23156) --- homeassistant/components/eliqonline/sensor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/eliqonline/sensor.py b/homeassistant/components/eliqonline/sensor.py index 12752b8db9e..03d6ad89591 100644 --- a/homeassistant/components/eliqonline/sensor.py +++ b/homeassistant/components/eliqonline/sensor.py @@ -1,6 +1,7 @@ """Monitors home energy use for the ELIQ Online service.""" from datetime import timedelta import logging +import asyncio import voluptuous as vol @@ -90,6 +91,6 @@ class EliqSensor(Entity): _LOGGER.debug("Updated power from server %d W", self._state) except KeyError: _LOGGER.warning("Invalid response from ELIQ Online API") - except OSError as error: + except (OSError, asyncio.TimeoutError) as error: _LOGGER.warning("Could not connect to the ELIQ Online API: %s", error)