Skip to content

Commit 3a71087

Browse files
authored
Bump aioasuswrt to 1.5.1 (home-assistant#153209)
1 parent c7d7cfa commit 3a71087

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

homeassistant/components/asuswrt/bridge.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from collections.abc import Awaitable, Callable, Coroutine
88
import functools
99
import logging
10-
from typing import Any, cast
10+
from typing import Any
1111

1212
from aioasuswrt.asuswrt import AsusWrt as AsusWrtLegacy
1313
from aiohttp import ClientSession
@@ -219,7 +219,7 @@ def _get_api(
219219
@property
220220
def is_connected(self) -> bool:
221221
"""Get connected status."""
222-
return cast(bool, self._api.is_connected)
222+
return self._api.is_connected
223223

224224
async def async_connect(self) -> None:
225225
"""Connect to the device."""
@@ -235,8 +235,7 @@ async def async_connect(self) -> None:
235235

236236
async def async_disconnect(self) -> None:
237237
"""Disconnect to the device."""
238-
if self._api is not None and self._protocol == PROTOCOL_TELNET:
239-
self._api.connection.disconnect()
238+
await self._api.async_disconnect()
240239

241240
async def async_get_connected_devices(self) -> dict[str, WrtDevice]:
242241
"""Get list of connected devices."""

homeassistant/components/asuswrt/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
"integration_type": "hub",
88
"iot_class": "local_polling",
99
"loggers": ["aioasuswrt", "asusrouter", "asyncssh"],
10-
"requirements": ["aioasuswrt==1.4.0", "asusrouter==1.21.0"]
10+
"requirements": ["aioasuswrt==1.5.1", "asusrouter==1.21.0"]
1111
}

requirements_all.txt

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

requirements_test_all.txt

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/components/asuswrt/test_init.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ async def test_disconnect_on_stop(hass: HomeAssistant, connect_legacy) -> None:
2626
hass.bus.async_fire(EVENT_HOMEASSISTANT_STOP)
2727
await hass.async_block_till_done()
2828

29-
assert connect_legacy.return_value.connection.disconnect.call_count == 1
29+
assert connect_legacy.return_value.async_disconnect.await_count == 1
3030
assert config_entry.state is ConfigEntryState.LOADED

0 commit comments

Comments
 (0)