File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -271,8 +271,7 @@ async def unregister_node(self, node: PlugwiseNode) -> None:
271271 if node .mac not in self ._registry :
272272 raise NodeError (f"No existing Node ({ node .mac } ) found to unregister" )
273273
274- # First reset the node, then remove it from the network.
275- await node .reset_node ()
274+ # First remove the node, when succesful then reset it.
276275 request = NodeRemoveRequest (self ._send_to_controller , self ._mac_nc , node .mac )
277276 if (response := await request .send ()) is None :
278277 raise NodeError (
@@ -285,6 +284,7 @@ async def unregister_node(self, node: PlugwiseNode) -> None:
285284 + f" failed to unregister node '{ node .mac } '"
286285 )
287286
287+ await node .reset_node ()
288288 await self .remove_network_registration (node .mac )
289289 await node .clear_cache ()
290290
You can’t perform that action at this time.
0 commit comments