Skip to content

Commit 14fce87

Browse files
committed
Translate to short hardware-version
1 parent 946ea0c commit 14fce87

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plugwise_usb/connection/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from ..api import StickEvent
1010
from ..constants import UTF8
1111
from ..exceptions import NodeError, StickError
12+
from ..helpers.util import version_to_model
1213
from ..messages.requests import (
1314
NodeInfoRequest,
1415
NodePingRequest,
@@ -194,7 +195,8 @@ async def initialize_stick(self) -> None:
194195
node_info, _ = await self.get_node_details(self._mac_stick, ping_first=False)
195196
if node_info is not None:
196197
self._fw_stick = node_info.firmware
197-
self._hw_stick = node_info.hardware
198+
hardware, _ = version_to_model(node_info.hardware)
199+
self._hw_stick = hardware
198200

199201
if not self._network_online:
200202
raise StickError("Zigbee network connection to Circle+ is down.")

0 commit comments

Comments
 (0)