Skip to content

Commit 2fd41c0

Browse files
committed
Try sending NodeAddRequest without requiring a response
1 parent 2a746b0 commit 2fd41c0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

plugwise_usb/network/registry.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,11 @@ async def register_node(self, mac: str) -> int:
248248
if not validate_mac(mac):
249249
raise NodeError(f"MAC '{mac}' invalid")
250250

251-
request = NodeAddRequest(self._send_to_controller, bytes(mac, UTF8), True)
252-
response = await request.send()
253-
if response is None or response.ack_id != StickResponseType.ACCEPT:
254-
raise NodeError(f"Failed to register node {mac}")
251+
#request = NodeAddRequest(self._send_to_controller, bytes(mac, UTF8), True)
252+
#response = await request.send()
253+
#if response is None or response.ack_id != StickResponseType.ACCEPT:
254+
# raise NodeError(f"Failed to register node {mac}")
255+
NodeAddRequest(self._send_to_controller, bytes(mac, UTF8), True)
255256
self.update_network_registration(self._first_free_address, mac, None)
256257
self._first_free_address += 1
257258
return self._first_free_address - 1

0 commit comments

Comments
 (0)