Catch more Hue errors (#32275)

This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2020-02-27 12:53:36 -08:00
1 parent ecd076c5e4
commit 5a56d0ec1d
3 files changed
+18 -5

No files matched your search

+2 -1
View File
@@ -3,6 +3,7 @@ import asyncio
from datetime import timedelta
import logging
from aiohttp import client_exceptions
from aiohue import AiohueException, Unauthorized
from aiohue.sensors import TYPE_ZLL_PRESENCE
import async_timeout
@@ -60,7 +61,7 @@ class SensorManager:
except Unauthorized:
await self.bridge.handle_unauthorized_error()
raise UpdateFailed
except (asyncio.TimeoutError, AiohueException):
except (asyncio.TimeoutError, AiohueException, client_exceptions.ClientError):
raise UpdateFailed
async def async_register_component(self, binary, async_add_entities):