Skip to content

Commit f22909f

Browse files
committed
Base NodeAddRequest on StickResponse
1 parent f46f008 commit f22909f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

plugwise_usb/messages/requests.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -409,13 +409,13 @@ def serialize(self) -> bytes:
409409
return MESSAGE_HEADER + msg + checksum + MESSAGE_FOOTER
410410

411411

412-
class PlugwiseRequestWithNodeAckResponse(PlugwiseRequest):
412+
class PlugwiseRequestWithStickResponse(PlugwiseRequest):
413413
"""Base class of a plugwise request with a NodeAckResponse."""
414414

415-
async def send(self, suppress_node_errors: bool = False) -> NodeAckResponse | None:
415+
async def send(self, suppress_node_errors: bool = False) -> StickResponse | None:
416416
"""Send request."""
417417
result = await self._send_request(suppress_node_errors)
418-
if isinstance(result, NodeAckResponse):
418+
if isinstance(result, StickResponse):
419419
return result
420420
if result is None:
421421
return None
@@ -424,15 +424,15 @@ async def send(self, suppress_node_errors: bool = False) -> NodeAckResponse | No
424424
)
425425

426426

427-
class NodeAddRequest(PlugwiseRequestWithNodeAckResponse):
427+
class NodeAddRequest(PlugwiseRequestWithStickResponse):
428428
"""Add node to the Plugwise Network and add it to memory of Circle+ node.
429429
430430
Supported protocols : 1.0, 2.0
431431
Response message : TODO check if response is NodeAckResponse
432432
"""
433433

434434
_identifier = b"0007"
435-
_reply_identifier = b"0005"
435+
_reply_identifier = b"0000" #"0005"
436436

437437
def __init__(
438438
self,

0 commit comments

Comments
 (0)