mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
catch asyncio.TimeoutError (#23156)
This commit is contained in:
parent
b909e5823f
commit
e114ae9b53
@ -1,6 +1,7 @@
|
|||||||
"""Monitors home energy use for the ELIQ Online service."""
|
"""Monitors home energy use for the ELIQ Online service."""
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
import logging
|
import logging
|
||||||
|
import asyncio
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
@ -90,6 +91,6 @@ class EliqSensor(Entity):
|
|||||||
_LOGGER.debug("Updated power from server %d W", self._state)
|
_LOGGER.debug("Updated power from server %d W", self._state)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
_LOGGER.warning("Invalid response from ELIQ Online API")
|
_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",
|
_LOGGER.warning("Could not connect to the ELIQ Online API: %s",
|
||||||
error)
|
error)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user