Skip to content

Commit 5a76872

Browse files
committed
Update NodeInfoResponse message
1 parent 0164d54 commit 5a76872

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

plugwise_usb/messages/responses.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ def __init__(self, protocol_version: str = "2.0") -> None:
616616
]
617617
self._frequency = Int(0, length=2)
618618
self._hw_ver = String(None, length=12)
619-
self._fw_ver = UnixTimestamp(0)
619+
self._fw_ver = UnixTimestamp(None)
620620
self._node_type = Int(0, length=2)
621621
self._params += [
622622
self._frequency,
@@ -864,6 +864,10 @@ def switch_state(self) -> bool:
864864
"""Return state of switch (True = On, False = Off)."""
865865
return (self._power_state.value != 0)
866866

867+
def __repr__(self) -> str:
868+
"""Convert request into writable str."""
869+
return f"{super().__repr__()[:-1]}, power_state={self._power_state.value}, group={self.group.value})"
870+
867871
class NodeFeaturesResponse(PlugwiseResponse):
868872
"""Returns supported features of node.
869873

0 commit comments

Comments
 (0)