@@ -208,30 +208,34 @@ async def _handle_stick_event(self, event: StickEvent) -> None:
208208 await gather (* [node .disconnect () for node in self ._nodes .values ()])
209209 self ._is_running = False
210210
211- async def node_awake_message (self , response : PlugwiseResponse ) -> bool :
211+ async def node_awake_message (self , response : PlugwiseResponse ) -> None :
212212 """Handle NodeAwakeResponse message."""
213213 if not isinstance (response , NodeAwakeResponse ):
214214 raise MessageError (
215215 f"Invalid response message type ({ response .__class__ .__name__ } ) received, expected NodeAwakeResponse"
216216 )
217+
217218 mac = response .mac_decoded
218219 if self ._awake_discovery .get (mac ) is None :
219220 self ._awake_discovery [mac ] = response .timestamp - timedelta (seconds = 15 )
221+
220222 if mac in self ._nodes :
221223 if self ._awake_discovery [mac ] < (
222224 response .timestamp - timedelta (seconds = 10 )
223225 ):
224226 await self ._notify_node_event_subscribers (NodeEvent .AWAKE , mac )
225227 self ._awake_discovery [mac ] = response .timestamp
226- return True
228+ return
229+
227230 if (address := self ._register .network_address (mac )) is None :
228231 if self ._register .scan_completed :
229- return True
232+ return
233+
230234 _LOGGER .debug (
231235 "Skip node awake message for %s because network registry address is unknown" ,
232236 mac ,
233237 )
234- return True
238+ return
235239
236240 if self ._nodes .get (mac ) is None :
237241 if (
@@ -243,7 +247,6 @@ async def node_awake_message(self, response: PlugwiseResponse) -> bool:
243247 )
244248 else :
245249 _LOGGER .debug ("duplicate maintenance awake discovery for %s" , mac )
246- return True
247250
248251 async def node_join_available_message (self , response : PlugwiseResponse ) -> bool :
249252 """Handle NodeJoinAvailableResponse messages."""
0 commit comments