Skip to content

Commit 9c32f55

Browse files
committed
Implement review feedback
1 parent c9644f6 commit 9c32f55

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

plugwise_usb/constants.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,12 @@
9090
}
9191

9292
TYPE_MODEL: Final[dict[int, tuple[str]]] = {
93-
0: ("Stick"),
93+
0: ("Stick",),
9494
1: ("Circle", "Stealth"),
95-
3: ("Switch"),
96-
4: (),
97-
5: ("Sense"),
98-
6: ("Scan"),
99-
7: ("Celsius"),
100-
8: ("Celsius"),
101-
9: ("Stealth"),
95+
3: ("Switch",),
96+
5: ("Sense",),
97+
6: ("Scan",),
98+
7: ("Celsius",),
99+
8: ("Celsius",),
100+
9: ("Stealth",),
102101
}

plugwise_usb/nodes/node.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,9 +511,9 @@ async def update_node_details(
511511
# Switch reports hardware version of paired Circle (pw_usb_beta #245)
512512
if self._node_info.node_type is not None:
513513
allowed_models = TYPE_MODEL.get(self._node_info.node_type.value)
514-
if allowed_models is not None and model_info[0] not in allowed_models:
514+
if allowed_models and model_info[0] not in allowed_models:
515515
# Replace model_info list
516-
model_info = [allowed_models[0]] # Not Ok for 1 but should not be a problem
516+
model_info = [allowed_models[0]] # Not correct for 1 but should not be a problem
517517
self._node_info.model = model_info[0]
518518

519519
# Handle + devices

0 commit comments

Comments
 (0)