Skip to content

Commit 69f9c0a

Browse files
authored
Typing for WrtDevice (home-assistant#154514)
1 parent 46f52db commit 69f9c0a

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

homeassistant/components/asuswrt/bridge.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
from __future__ import annotations
44

55
from abc import ABC, abstractmethod
6-
from collections import namedtuple
76
from collections.abc import Awaitable, Callable, Coroutine
87
import functools
98
import logging
10-
from typing import Any
9+
from typing import Any, NamedTuple
1110

1211
from aioasuswrt.asuswrt import AsusWrt as AsusWrtLegacy
1312
from aiohttp import ClientSession
@@ -61,7 +60,14 @@
6160
SENSORS_TYPE_TEMPERATURES = "sensors_temperatures"
6261
SENSORS_TYPE_UPTIME = "sensors_uptime"
6362

64-
WrtDevice = namedtuple("WrtDevice", ["ip", "name", "connected_to"]) # noqa: PYI024
63+
64+
class WrtDevice(NamedTuple):
65+
"""WrtDevice structure."""
66+
67+
ip: str | None
68+
name: str | None
69+
conneted_to: str | None
70+
6571

6672
_LOGGER = logging.getLogger(__name__)
6773

0 commit comments

Comments
 (0)