From 576e03509c0a5540966289ef94cde9fdbee458a6 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Fri, 15 Aug 2025 15:31:00 +0200 Subject: [PATCH 01/20] Remove useless warning message --- plugwise_usb/connection/sender.py | 1 - plugwise_usb/messages/requests.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/plugwise_usb/connection/sender.py b/plugwise_usb/connection/sender.py index 36030f13e..c4df44688 100644 --- a/plugwise_usb/connection/sender.py +++ b/plugwise_usb/connection/sender.py @@ -147,7 +147,6 @@ async def write_request_to_port(self, request: PlugwiseRequest) -> None: async def _process_stick_response(self, response: StickResponse) -> None: """Process stick response.""" if self._stick_response is None or self._stick_response.done(): - _LOGGER.warning("No open request for %s", str(response)) return _LOGGER.debug("Received %s as reply to %s", response, self._current_request) self._stick_response.set_result(response) diff --git a/plugwise_usb/messages/requests.py b/plugwise_usb/messages/requests.py index bbaf00145..e0d2ea5f4 100644 --- a/plugwise_usb/messages/requests.py +++ b/plugwise_usb/messages/requests.py @@ -215,7 +215,7 @@ def _response_timeout_expired(self, stick_timeout: bool = False) -> None: if self._response_future.done(): return if stick_timeout: - _LOGGER.info("USB-stick responded with time out to %s", self) + _LOGGER.info("USB-stick response timeout to %s", self) else: _LOGGER.info( "No response received for %s within %s seconds", self, NODE_TIME_OUT @@ -225,7 +225,7 @@ def _response_timeout_expired(self, stick_timeout: bool = False) -> None: self._unsubscribe_from_node() if stick_timeout: self._response_future.set_exception( - StickTimeout(f"USB-stick responded with time out to {self}") + StickTimeout(f"USB-stick response timeout to {self}") ) else: self._response_future.set_exception( From 2415946f46f6659fafbf53bfea9d5c43e2f569fd Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Fri, 15 Aug 2025 15:50:55 +0200 Subject: [PATCH 02/20] Promote more clear message to warning --- plugwise_usb/network/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugwise_usb/network/__init__.py b/plugwise_usb/network/__init__.py index e71ce2d81..8f7ac625e 100644 --- a/plugwise_usb/network/__init__.py +++ b/plugwise_usb/network/__init__.py @@ -418,7 +418,7 @@ async def _discover_node( _LOGGER.debug("Starting the discovery of node %s with unknown NodeType", mac) node_info, node_ping = await self._controller.get_node_details(mac, ping_first) if node_info is None: - _LOGGER.debug("Node %s with unknown NodeType not responding", mac) + _LOGGER.warning("Node %s with unknown NodeType not responding, is it offline?", mac) self._registry_stragglers.append(mac) return False await self._create_node_object(mac, node_info.node_type) From 3c0e8aa84d27ed8bb54e93d565dd083864417c30 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Fri, 15 Aug 2025 16:00:53 +0200 Subject: [PATCH 03/20] Various CRAI nitpicks --- plugwise_usb/messages/requests.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/plugwise_usb/messages/requests.py b/plugwise_usb/messages/requests.py index e0d2ea5f4..d249a2001 100644 --- a/plugwise_usb/messages/requests.py +++ b/plugwise_usb/messages/requests.py @@ -1,4 +1,4 @@ -"""All known request messages to be send to plugwise devices.""" +"""All known request messages to be sent to plugwise devices.""" from __future__ import annotations @@ -58,7 +58,7 @@ class PlugwiseRequest(PlugwiseMessage): - """Base class for request messages to be send from by USB-Stick.""" + """Base class for request messages to be sent from by USB-Stick.""" _reply_identifier: bytes = b"0000" @@ -215,7 +215,7 @@ def _response_timeout_expired(self, stick_timeout: bool = False) -> None: if self._response_future.done(): return if stick_timeout: - _LOGGER.info("USB-stick response timeout to %s", self) + _LOGGER.info("USB-stick response timeout fot %s", self) else: _LOGGER.info( "No response received for %s within %s seconds", self, NODE_TIME_OUT @@ -225,12 +225,12 @@ def _response_timeout_expired(self, stick_timeout: bool = False) -> None: self._unsubscribe_from_node() if stick_timeout: self._response_future.set_exception( - StickTimeout(f"USB-stick response timeout to {self}") + StickTimeout(f"USB-stick response timeout for {self}") ) else: self._response_future.set_exception( NodeTimeout( - f"No device response to {self} within {NODE_TIME_OUT} seconds" + f"No device response for {self} within {NODE_TIME_OUT} seconds" ) ) @@ -249,16 +249,17 @@ async def process_node_response(self, response: PlugwiseResponse) -> bool: if self._seq_id is None: _LOGGER.warning( "Received %s as reply to %s without a seq_id assigned", - self._response, + response, self, ) return False if self._seq_id != response.seq_id: _LOGGER.warning( - "Received %s as reply to %s which is not correct (expected seq_id=%s)", - self._response, + "Received %s as reply to %s with mismatched seq_id (expected=%r, got=%r)", + response, self, - str(self.seq_id), + self.seq_id, + response.seq_id, ) return False if self._response_future.done(): @@ -297,12 +298,12 @@ async def _process_stick_response(self, stick_response: StickResponse) -> None: return if stick_response.ack_id == StickResponseType.FAILED: + prev_seq_id = self._seq_id self._unsubscribe_from_node() self._seq_id = None self._response_future.set_exception( - NodeError(f"Stick failed request {self._seq_id}") + NodeError(f"Stick failed request {prev_seq_id!r}") ) - return _LOGGER.debug( "Unknown StickResponseType %s at %s for request %s", From b66cb046f8786e8c6888a1d539c38209b8708fbb Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Fri, 15 Aug 2025 16:05:00 +0200 Subject: [PATCH 04/20] One more CRAI nitpick --- plugwise_usb/network/__init__.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/plugwise_usb/network/__init__.py b/plugwise_usb/network/__init__.py index 8f7ac625e..c2e7a1044 100644 --- a/plugwise_usb/network/__init__.py +++ b/plugwise_usb/network/__init__.py @@ -322,10 +322,9 @@ async def discover_network_coordinator(self, load: bool = False) -> bool: ping_response = await ping_request.send() except StickTimeout as err: raise StickError( - "The zigbee network coordinator (Circle+/Stealth+) with mac " - + "'%s' did not respond to ping request. Make " - + "sure the Circle+/Stealth+ is within reach of the USB-stick !", - self._controller.mac_coordinator, + f"The zigbee network coordinator (Circle+/Stealth+) with mac " + f"'{self._controller.mac_coordinator}' did not respond to the ping request. " + "Make sure the Circle+/Stealth+ is within reach of the USB-stick!" ) from err if ping_response is None: return False From 193fad0a2aaef0a270c9252fc4a90b38bae6e417 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Fri, 15 Aug 2025 16:11:15 +0200 Subject: [PATCH 05/20] Improve further --- plugwise_usb/messages/requests.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/plugwise_usb/messages/requests.py b/plugwise_usb/messages/requests.py index d249a2001..b624528ba 100644 --- a/plugwise_usb/messages/requests.py +++ b/plugwise_usb/messages/requests.py @@ -299,18 +299,9 @@ async def _process_stick_response(self, stick_response: StickResponse) -> None: if stick_response.ack_id == StickResponseType.FAILED: prev_seq_id = self._seq_id - self._unsubscribe_from_node() self._seq_id = None - self._response_future.set_exception( - NodeError(f"Stick failed request {prev_seq_id!r}") - ) - - _LOGGER.debug( - "Unknown StickResponseType %s at %s for request %s", - str(stick_response.ack_id), - stick_response, - self, - ) + self.assign_error(NodeError(f"Stick failed request {prev_seq_id!r}")) + return async def _send_request( self, suppress_node_errors=False From d6007882d2e34a502d5a24ae617cf6e3b49f3ca8 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Fri, 15 Aug 2025 16:12:22 +0200 Subject: [PATCH 06/20] Fix typo --- plugwise_usb/messages/requests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugwise_usb/messages/requests.py b/plugwise_usb/messages/requests.py index b624528ba..e59ddb929 100644 --- a/plugwise_usb/messages/requests.py +++ b/plugwise_usb/messages/requests.py @@ -215,7 +215,7 @@ def _response_timeout_expired(self, stick_timeout: bool = False) -> None: if self._response_future.done(): return if stick_timeout: - _LOGGER.info("USB-stick response timeout fot %s", self) + _LOGGER.info("USB-stick response timeout for %s", self) else: _LOGGER.info( "No response received for %s within %s seconds", self, NODE_TIME_OUT From a263b40d628186b879cd337f7c8e73222e3af5bf Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Fri, 15 Aug 2025 16:19:02 +0200 Subject: [PATCH 07/20] Unsubscribe all node message subscriptions, as suggested --- plugwise_usb/network/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugwise_usb/network/__init__.py b/plugwise_usb/network/__init__.py index c2e7a1044..aa3089060 100644 --- a/plugwise_usb/network/__init__.py +++ b/plugwise_usb/network/__init__.py @@ -297,6 +297,12 @@ def _unsubscribe_to_protocol_events(self) -> None: if self._unsubscribe_node_awake is not None: self._unsubscribe_node_awake() self._unsubscribe_node_awake = None + if self._unsubscribe_node_join is not None: + self._unsubscribe_node_join() + self._unsubscribe_node_join = None + if self._unsubscribe_node_rejoin is not None: + self._unsubscribe_node_rejoin() + self._unsubscribe_node_rejoin = None if self._unsubscribe_stick_event is not None: self._unsubscribe_stick_event() self._unsubscribe_stick_event = None From 990025c19530ae3222caa8df2bed58d947fb0b4e Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Fri, 15 Aug 2025 16:21:16 +0200 Subject: [PATCH 08/20] Avoid duplicate NodeEvent.LOADED notifications --- plugwise_usb/network/__init__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugwise_usb/network/__init__.py b/plugwise_usb/network/__init__.py index aa3089060..43d4931be 100644 --- a/plugwise_usb/network/__init__.py +++ b/plugwise_usb/network/__init__.py @@ -479,9 +479,7 @@ async def _load_discovered_nodes(self) -> bool: _LOGGER.debug("_load_discovered_nodes | load_result=%s", load_result) result_index = 0 for mac in nodes_not_loaded: - if load_result[result_index]: - await self._notify_node_event_subscribers(NodeEvent.LOADED, mac) - else: + if not load_result[result_index]: _LOGGER.debug( "_load_discovered_nodes | Load request for %s failed", mac ) From 321b76a5ba85aa640d90d89ec446bef8e00a6315 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Fri, 15 Aug 2025 16:23:23 +0200 Subject: [PATCH 09/20] Ruffed --- plugwise_usb/network/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugwise_usb/network/__init__.py b/plugwise_usb/network/__init__.py index 43d4931be..613c1c0b3 100644 --- a/plugwise_usb/network/__init__.py +++ b/plugwise_usb/network/__init__.py @@ -423,7 +423,9 @@ async def _discover_node( _LOGGER.debug("Starting the discovery of node %s with unknown NodeType", mac) node_info, node_ping = await self._controller.get_node_details(mac, ping_first) if node_info is None: - _LOGGER.warning("Node %s with unknown NodeType not responding, is it offline?", mac) + _LOGGER.warning( + "Node %s with unknown NodeType not responding, is it offline?", mac + ) self._registry_stragglers.append(mac) return False await self._create_node_object(mac, node_info.node_type) From 6ff9236037554e35b62c9415495ea96afd1358c4 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Fri, 15 Aug 2025 16:32:44 +0200 Subject: [PATCH 10/20] Update CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6093479c7..42341884c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +# Ongoing + +- PR [319](https://github.com/plugwise/python-plugwise-usb/pull/319): Replace unclear warning message when a node is not online, also various small improvements suggested by CRAI. + ## v0.44.11 - 2025-08-14 - Improve reading from energy-logs cache via PR [314](https://github.com/plugwise/python-plugwise-usb/pull/314) From d7ab93e36805af16b0c6c166b4ec6655b64e126b Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Fri, 15 Aug 2025 16:34:54 +0200 Subject: [PATCH 11/20] Fix typo --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 42341884c..90190a3a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -# Ongoing +## Ongoing - PR [319](https://github.com/plugwise/python-plugwise-usb/pull/319): Replace unclear warning message when a node is not online, also various small improvements suggested by CRAI. From 31c025fc4a91a539eb48ae76394b017d29636971 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Fri, 15 Aug 2025 16:35:37 +0200 Subject: [PATCH 12/20] Bump to v0.44.12a0 test-version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 747abaebf..a58485f2c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "plugwise_usb" -version = "0.44.11" +version = "0.44.12a0" license = "MIT" keywords = ["home", "automation", "plugwise", "module", "usb"] classifiers = [ From b1f09c3cf2c64467c58b8b614589f01e96ed4fd5 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Fri, 15 Aug 2025 16:38:30 +0200 Subject: [PATCH 13/20] Remove redundant return --- plugwise_usb/messages/requests.py | 1 - 1 file changed, 1 deletion(-) diff --git a/plugwise_usb/messages/requests.py b/plugwise_usb/messages/requests.py index e59ddb929..39e07a46b 100644 --- a/plugwise_usb/messages/requests.py +++ b/plugwise_usb/messages/requests.py @@ -301,7 +301,6 @@ async def _process_stick_response(self, stick_response: StickResponse) -> None: prev_seq_id = self._seq_id self._seq_id = None self.assign_error(NodeError(f"Stick failed request {prev_seq_id!r}")) - return async def _send_request( self, suppress_node_errors=False From da9852336621dd22ba36296bad9123be6244466f Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Fri, 15 Aug 2025 17:13:40 +0200 Subject: [PATCH 14/20] Change two warning-messages to debug trying to reduce amount of warning messages for an offline node --- plugwise_usb/connection/queue.py | 2 +- plugwise_usb/nodes/circle.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugwise_usb/connection/queue.py b/plugwise_usb/connection/queue.py index a74d8d430..cc7a55c4f 100644 --- a/plugwise_usb/connection/queue.py +++ b/plugwise_usb/connection/queue.py @@ -110,7 +110,7 @@ async def submit(self, request: PlugwiseRequest) -> PlugwiseResponse | None: elif request.resend: _LOGGER.debug("%s, retrying", exc) else: - _LOGGER.warning("%s, cancel request", exc) # type: ignore[unreachable] + _LOGGER.debug("%s, cancel request", exc) # type: ignore[unreachable] except StickError as exc: _LOGGER.error(exc) raise StickError( diff --git a/plugwise_usb/nodes/circle.py b/plugwise_usb/nodes/circle.py index 8e644a26b..3c548e449 100644 --- a/plugwise_usb/nodes/circle.py +++ b/plugwise_usb/nodes/circle.py @@ -973,7 +973,7 @@ async def _load_from_cache(self) -> bool: # Energy collection if not await self._energy_log_records_load_from_cache(): - _LOGGER.warning( + _LOGGER.debug( "Node %s failed to load energy_log_records from cache", self._mac_in_str, ) From 52ffc37cad626c4be508faa5857d80f46e3c26a0 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Fri, 15 Aug 2025 17:29:16 +0200 Subject: [PATCH 15/20] Fix unreachable suppression, a CRAI nitpick --- plugwise_usb/connection/queue.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/plugwise_usb/connection/queue.py b/plugwise_usb/connection/queue.py index cc7a55c4f..f8d774b61 100644 --- a/plugwise_usb/connection/queue.py +++ b/plugwise_usb/connection/queue.py @@ -85,7 +85,9 @@ async def submit(self, request: PlugwiseRequest) -> PlugwiseResponse | None: f"Cannot send message {request} which is currently waiting for response." ) - while request.resend: + while True: + if not request.resend: + break _LOGGER.debug("submit | start (%s) %s", request.retries_left, request) if not self._running or self._stick is None: raise StickError( @@ -107,10 +109,12 @@ async def submit(self, request: PlugwiseRequest) -> PlugwiseResponse | None: "%s, cancel because timeout is expected for NodePingRequests", exc, ) - elif request.resend: + continue + if request.resend: _LOGGER.debug("%s, retrying", exc) - else: - _LOGGER.debug("%s, cancel request", exc) # type: ignore[unreachable] + continue + _LOGGER.debug("%s, cancel request", exc) + break except StickError as exc: _LOGGER.error(exc) raise StickError( From 9dd1724a7cd783e23e846de1ecd016889a8b10ad Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Fri, 15 Aug 2025 17:38:40 +0200 Subject: [PATCH 16/20] Bump to a1 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a58485f2c..6b79f94dd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "plugwise_usb" -version = "0.44.12a0" +version = "0.44.12a1" license = "MIT" keywords = ["home", "automation", "plugwise", "module", "usb"] classifiers = [ From 6ac69d21f5dac1f97fe5fc5a431959bf0397da2f Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Fri, 15 Aug 2025 17:54:51 +0200 Subject: [PATCH 17/20] Fix missing request.resend parentheses --- plugwise_usb/connection/queue.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugwise_usb/connection/queue.py b/plugwise_usb/connection/queue.py index f8d774b61..3a43150df 100644 --- a/plugwise_usb/connection/queue.py +++ b/plugwise_usb/connection/queue.py @@ -86,7 +86,7 @@ async def submit(self, request: PlugwiseRequest) -> PlugwiseResponse | None: ) while True: - if not request.resend: + if not request.resend(): break _LOGGER.debug("submit | start (%s) %s", request.retries_left, request) if not self._running or self._stick is None: @@ -110,7 +110,7 @@ async def submit(self, request: PlugwiseRequest) -> PlugwiseResponse | None: exc, ) continue - if request.resend: + if request.resend(): _LOGGER.debug("%s, retrying", exc) continue _LOGGER.debug("%s, cancel request", exc) From 78af95c7e3246daa591e2c240f8f121515c6e555 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Fri, 15 Aug 2025 17:57:15 +0200 Subject: [PATCH 18/20] Minor f-string fixes --- plugwise_usb/connection/queue.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugwise_usb/connection/queue.py b/plugwise_usb/connection/queue.py index 3a43150df..c368854a8 100644 --- a/plugwise_usb/connection/queue.py +++ b/plugwise_usb/connection/queue.py @@ -91,8 +91,8 @@ async def submit(self, request: PlugwiseRequest) -> PlugwiseResponse | None: _LOGGER.debug("submit | start (%s) %s", request.retries_left, request) if not self._running or self._stick is None: raise StickError( - f"Cannot send message {request.__class__.__name__} for" - + f"{request.mac_decoded} because queue manager is stopped" + f"Cannot send message {request.__class__.__name__} for " + f"{request.mac_decoded} because queue manager is stopped" ) await self._add_request_to_queue(request) @@ -119,12 +119,12 @@ async def submit(self, request: PlugwiseRequest) -> PlugwiseResponse | None: _LOGGER.error(exc) raise StickError( f"No response received for {request.__class__.__name__} " - + f"to {request.mac_decoded}" + f"to {request.mac_decoded}" ) from exc except BaseException as exc: raise StickError( f"No response received for {request.__class__.__name__} " - + f"to {request.mac_decoded}" + f"to {request.mac_decoded}" ) from exc return None From 998d8339ca4ce70aaa3a5294b21773f99c099034 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Fri, 15 Aug 2025 18:07:06 +0200 Subject: [PATCH 19/20] Revert adding parentheses, resend is a bool --- plugwise_usb/connection/queue.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugwise_usb/connection/queue.py b/plugwise_usb/connection/queue.py index c368854a8..8e0a4b9cb 100644 --- a/plugwise_usb/connection/queue.py +++ b/plugwise_usb/connection/queue.py @@ -86,7 +86,7 @@ async def submit(self, request: PlugwiseRequest) -> PlugwiseResponse | None: ) while True: - if not request.resend(): + if not request.resend: break _LOGGER.debug("submit | start (%s) %s", request.retries_left, request) if not self._running or self._stick is None: @@ -110,7 +110,7 @@ async def submit(self, request: PlugwiseRequest) -> PlugwiseResponse | None: exc, ) continue - if request.resend(): + if request.resend: _LOGGER.debug("%s, retrying", exc) continue _LOGGER.debug("%s, cancel request", exc) From 9319c81e84620ff9f0b1a94cbeedfbb3661fb837 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 16 Aug 2025 09:08:34 +0200 Subject: [PATCH 20/20] Revert "Avoid duplicate NodeEvent.LOADED notifications" This reverts commit 990025c19530ae3222caa8df2bed58d947fb0b4e. --- plugwise_usb/network/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugwise_usb/network/__init__.py b/plugwise_usb/network/__init__.py index 613c1c0b3..8272747b7 100644 --- a/plugwise_usb/network/__init__.py +++ b/plugwise_usb/network/__init__.py @@ -481,7 +481,9 @@ async def _load_discovered_nodes(self) -> bool: _LOGGER.debug("_load_discovered_nodes | load_result=%s", load_result) result_index = 0 for mac in nodes_not_loaded: - if not load_result[result_index]: + if load_result[result_index]: + await self._notify_node_event_subscribers(NodeEvent.LOADED, mac) + else: _LOGGER.debug( "_load_discovered_nodes | Load request for %s failed", mac )