diff --git a/homeassistant/components/sensor/eliqonline.py b/homeassistant/components/sensor/eliqonline.py index 4e6b8a5c342..4f30e1efd00 100644 --- a/homeassistant/components/sensor/eliqonline.py +++ b/homeassistant/components/sensor/eliqonline.py @@ -7,6 +7,7 @@ For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.eliqonline/ """ import logging +from urllib.error import URLError from homeassistant.helpers.entity import Entity from homeassistant.const import (STATE_UNKNOWN, CONF_ACCESS_TOKEN, CONF_NAME) @@ -73,5 +74,5 @@ class EliqSensor(Entity): try: response = self.api.get_data_now(channelid=self.channel_id) self._state = int(response.power) - except TypeError: # raised by eliqonline library on any HTTP error - pass + except (TypeError, URLError): + _LOGGER.error("could not connect to the eliqonline servers")