Skip to content

Commit f1974e1

Browse files
committed
Try
1 parent ccb7bbb commit f1974e1

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

plugwise_usb/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,12 @@ def joined_nodes(self) -> int | None:
120120
@property
121121
def firmware_stick(self) -> str:
122122
"""Firmware of USB-Stick."""
123-
return self._controller.firmware_stick
123+
return self._controller._fw_stick
124124

125125
@property
126126
def hardware_stick(self) -> str:
127127
"""Hardware of USB-Stick."""
128-
return self._controller.hardware_stick
128+
return self._controller._hw_stick
129129

130130
@property
131131
def mac_stick(self) -> str:

plugwise_usb/connection/__init__.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ def is_connected(self) -> bool:
5656
"""Return connection state from connection manager."""
5757
return self._manager.is_connected
5858

59-
@property
60-
def firmware_stick(self) -> str | None:
61-
"""Firmware version of the Stick."""
62-
return self._fw_stick
63-
64-
@property
65-
def hardware_stick(self) -> str | None:
66-
"""Hardware version of the Stick."""
67-
return self._hw_stick
59+
# @property
60+
# def firmware_stick(self) -> str | None:
61+
# """Firmware version of the Stick."""
62+
# return self._fw_stick
63+
64+
# @property
65+
# def hardware_stick(self) -> str | None:
66+
# """Hardware version of the Stick."""
67+
# return self._hw_stick
6868

6969
@property
7070
def mac_stick(self) -> str:

tests/test_usb.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ async def test_stick_connect(self, monkeypatch: pytest.MonkeyPatch) -> None:
461461
assert stick.mac_stick == "0123456789012345"
462462
assert stick.mac_coordinator == "0098765432101234"
463463
assert stick.firmware_stick == None
464-
assert stick.hardware_stick == None # "653907008512"
464+
assert stick.hardware_stick == None
465465
assert not stick.network_discovered
466466
assert stick.network_state
467467
assert stick.network_id == 17185
@@ -578,6 +578,9 @@ async def test_stick_node_discovered_subscription(
578578
events=(pw_api.NodeEvent.AWAKE,),
579579
)
580580

581+
#assert stick.firmware_stick == None
582+
assert stick.hardware_stick == "653907008512"
583+
581584
# Inject NodeAwakeResponse message to trigger a 'node discovered' event
582585
mock_serial.inject_message(b"004F555555555555555500", b"FFFE")
583586
mac_awake_node = await self.test_node_awake

0 commit comments

Comments
 (0)