Bump aioasuswrt to 1.5.1 (#153209)

This commit is contained in:
Magnus
2025-10-13 10:59:22 +02:00
committed by GitHub
parent c7d7cfa7ad
commit 3a71087c9c
5 changed files with 7 additions and 8 deletions

View File

@@ -7,7 +7,7 @@ from collections import namedtuple
from collections.abc import Awaitable, Callable, Coroutine
import functools
import logging
from typing import Any, cast
from typing import Any
from aioasuswrt.asuswrt import AsusWrt as AsusWrtLegacy
from aiohttp import ClientSession
@@ -219,7 +219,7 @@ class AsusWrtLegacyBridge(AsusWrtBridge):
@property
def is_connected(self) -> bool:
"""Get connected status."""
return cast(bool, self._api.is_connected)
return self._api.is_connected
async def async_connect(self) -> None:
"""Connect to the device."""
@@ -235,8 +235,7 @@ class AsusWrtLegacyBridge(AsusWrtBridge):
async def async_disconnect(self) -> None:
"""Disconnect to the device."""
if self._api is not None and self._protocol == PROTOCOL_TELNET:
self._api.connection.disconnect()
await self._api.async_disconnect()
async def async_get_connected_devices(self) -> dict[str, WrtDevice]:
"""Get list of connected devices."""

View File

@@ -7,5 +7,5 @@
"integration_type": "hub",
"iot_class": "local_polling",
"loggers": ["aioasuswrt", "asusrouter", "asyncssh"],
"requirements": ["aioasuswrt==1.4.0", "asusrouter==1.21.0"]
"requirements": ["aioasuswrt==1.5.1", "asusrouter==1.21.0"]
}

2
requirements_all.txt generated
View File

@@ -201,7 +201,7 @@ aioaquacell==0.2.0
aioaseko==1.0.0
# homeassistant.components.asuswrt
aioasuswrt==1.4.0
aioasuswrt==1.5.1
# homeassistant.components.husqvarna_automower
aioautomower==2.2.1

View File

@@ -189,7 +189,7 @@ aioaquacell==0.2.0
aioaseko==1.0.0
# homeassistant.components.asuswrt
aioasuswrt==1.4.0
aioasuswrt==1.5.1
# homeassistant.components.husqvarna_automower
aioautomower==2.2.1

View File

@@ -26,5 +26,5 @@ async def test_disconnect_on_stop(hass: HomeAssistant, connect_legacy) -> None:
hass.bus.async_fire(EVENT_HOMEASSISTANT_STOP)
await hass.async_block_till_done()
assert connect_legacy.return_value.connection.disconnect.call_count == 1
assert connect_legacy.return_value.async_disconnect.await_count == 1
assert config_entry.state is ConfigEntryState.LOADED