Skip to content

Commit 3628a4d

Browse files
committed
Remove type info
1 parent d305ea8 commit 3628a4d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

plugwise_usb/nodes/node.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,14 +510,17 @@ async def update_node_details(
510510
hardware, model_info = version_to_model(hardware)
511511
model_info = model_info.split(" ")
512512
self._node_info.model = model_info[0]
513+
# Correct model when node_type doesn't match
514+
# Switch reports hardware version of paired Circle (pw_usb_beta #245)
513515
if (
514516
self._node_info.node_type is not None
515517
and (
516-
correct_model := str(self._node_info.node_type.name).lower().split("_")[0]
518+
correct_model := self._node_info.node_type.name.lower().split("_")[0]
517519
) not in self._node_info.model.lower()
518520
):
519521
self._node_info.model = correct_model.capitalize()
520-
model_info[0] = self._node_info.model
522+
# Replace model_info list
523+
model_info = [self._node_info.model]
521524

522525
# Handle + devices
523526
if len(model_info) > 1 and "+" in model_info[1]:

0 commit comments

Comments
 (0)