Skip to content

Commit c9dd475

Browse files
committed
Disable NodeAddRequest response-checking
1 parent ed72805 commit c9dd475

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

plugwise_usb/network/registry.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
NodeRemoveRequest,
1818
PlugwiseRequest,
1919
)
20-
from ..messages.responses import PlugwiseResponse, StickResponseType
20+
from ..messages.responses import PlugwiseResponse #, StickResponseType
2121
from .cache import NetworkRegistrationCache
2222

2323
_LOGGER = logging.getLogger(__name__)
@@ -248,10 +248,10 @@ 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+
_ = 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}")
255255
self.update_network_registration(self._first_free_address, mac, None)
256256
self._first_free_address += 1
257257
return self._first_free_address - 1

0 commit comments

Comments
 (0)