Bump aiounifi to v69 to improve websocket logging (#108265)

This commit is contained in:
Robert Svensson 2024-01-18 03:33:31 +01:00 committed by Franck Nijhof
parent 59e12ad0c1
commit 005af2eb4c
No known key found for this signature in database
GPG key ID: D62583BA8AB11CA3
4 changed files with 8 additions and 4 deletions

View file

@ -7,6 +7,7 @@ import ssl
from types import MappingProxyType from types import MappingProxyType
from typing import Any, Literal from typing import Any, Literal
import aiohttp
from aiohttp import CookieJar from aiohttp import CookieJar
import aiounifi import aiounifi
from aiounifi.interfaces.api_handlers import ItemEvent from aiounifi.interfaces.api_handlers import ItemEvent
@ -374,7 +375,10 @@ class UniFiController:
async def _websocket_runner() -> None: async def _websocket_runner() -> None:
"""Start websocket.""" """Start websocket."""
await self.api.start_websocket() try:
await self.api.start_websocket()
except (aiohttp.ClientConnectorError, aiounifi.WebsocketError):
LOGGER.error("Websocket disconnected")
self.available = False self.available = False
async_dispatcher_send(self.hass, self.signal_reachable) async_dispatcher_send(self.hass, self.signal_reachable)
self.hass.loop.call_later(RETRY_TIMER, self.reconnect, True) self.hass.loop.call_later(RETRY_TIMER, self.reconnect, True)

View file

@ -8,7 +8,7 @@
"iot_class": "local_push", "iot_class": "local_push",
"loggers": ["aiounifi"], "loggers": ["aiounifi"],
"quality_scale": "platinum", "quality_scale": "platinum",
"requirements": ["aiounifi==68"], "requirements": ["aiounifi==69"],
"ssdp": [ "ssdp": [
{ {
"manufacturer": "Ubiquiti Networks", "manufacturer": "Ubiquiti Networks",

View file

@ -377,7 +377,7 @@ aiosyncthing==0.5.1
aiotractive==0.5.6 aiotractive==0.5.6
# homeassistant.components.unifi # homeassistant.components.unifi
aiounifi==68 aiounifi==69
# homeassistant.components.vlc_telnet # homeassistant.components.vlc_telnet
aiovlc==0.1.0 aiovlc==0.1.0

View file

@ -350,7 +350,7 @@ aiosyncthing==0.5.1
aiotractive==0.5.6 aiotractive==0.5.6
# homeassistant.components.unifi # homeassistant.components.unifi
aiounifi==68 aiounifi==69
# homeassistant.components.vlc_telnet # homeassistant.components.vlc_telnet
aiovlc==0.1.0 aiovlc==0.1.0