Skip to content

Commit e2f1903

Browse files
committed
CR: Fix consistency self._registry type
1 parent bcf644e commit e2f1903

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

plugwise_usb/network/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def nodes(
146146
return self._nodes
147147

148148
@property
149-
def registry(self) -> dict[int, tuple[str, NodeType | None]]:
149+
def registry(self) -> list[str]:
150150
"""Return dictionary with all registered (joined) nodes."""
151151
return self._register.registry
152152

plugwise_usb/network/registry.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,6 @@ def node_is_registered(self, mac: str) -> bool:
158158
return True
159159
return False
160160

161-
def network_controller(self) -> tuple[str, NodeType | None]:
162-
"""Return the registration for the network controller."""
163-
if self._registry.get(-1) is None:
164-
raise NodeError("Unable to return network controller details")
165-
return self.registry[-1]
166-
167161
async def update_network_nodetype(self, mac: str, node_type: NodeType) -> None:
168162
"""Update NodeType inside registry and cache."""
169163
if self._network_cache is None or mac == "":

0 commit comments

Comments
 (0)