1- """
2- Use of this source code is governed by the MIT license found in the LICENSE file.
1+ """Use of this source code is governed by the MIT license found in the LICENSE file.
32
43Main stick object to control associated plugwise plugs
54"""
1312 ACCEPT_JOIN_REQUESTS ,
1413 CB_JOIN_REQUEST ,
1514 CB_NEW_NODE ,
16- HW_MODELS ,
1715 MESSAGE_TIME_OUT ,
1816 NODE_TYPE_CELSIUS_NR ,
1917 NODE_TYPE_CELSIUS_SED ,
@@ -232,8 +230,7 @@ def unsubscribe_stick_callback(self, callback, callback_type):
232230 self ._stick_callbacks [callback_type ].remove (callback )
233231
234232 def allow_join_requests (self , enable : bool , accept : bool ):
235- """
236- Enable or disable Plugwise network
233+ """Enable or disable Plugwise network
237234 Automatically accept new join request
238235 """
239236 self .msg_controller .send (NodeAllowJoiningRequest (enable ))
@@ -475,8 +472,7 @@ def _process_node_info_response(self, node_info_response, mac):
475472 self ._pass_message_to_node (node_info_response , mac )
476473
477474 def _process_node_join_request (self , node_join_request , mac ):
478- """
479- Process NodeJoinAvailableResponse message from a node that
475+ """Process NodeJoinAvailableResponse message from a node that
480476 is not part of a plugwise network yet and wants to join
481477 """
482478 if self ._device_nodes .get (mac ):
@@ -501,8 +497,7 @@ def _process_node_join_request(self, node_join_request, mac):
501497 self .do_callback (CB_JOIN_REQUEST , mac )
502498
503499 def _process_node_remove (self , node_remove_response ):
504- """
505- Process NodeRemoveResponse message with confirmation
500+ """Process NodeRemoveResponse message with confirmation
506501 if node is is removed from the Plugwise network.
507502 """
508503 unjoined_mac = node_remove_response .node_mac_id .value
@@ -525,8 +520,7 @@ def _process_node_remove(self, node_remove_response):
525520 )
526521
527522 def _pass_message_to_node (self , message , mac , discover = True ):
528- """
529- Pass message to node class to take action on message
523+ """Pass message to node class to take action on message
530524
531525 Returns True if message has passed onto existing known node
532526 """
@@ -544,8 +538,7 @@ def _pass_message_to_node(self, message, mac, discover=True):
544538 return False
545539
546540 def _watchdog_loop (self ):
547- """
548- Main worker loop to watch all other worker threads
541+ """Main worker loop to watch all other worker threads
549542 """
550543 time .sleep (5 )
551544 circle_plus_retry_counter = 0
@@ -600,8 +593,7 @@ def _watchdog_loop(self):
600593 _LOGGER .debug ("watchdog loop stopped" )
601594
602595 def _update_loop (self ):
603- """
604- When node has not received any message during
596+ """When node has not received any message during
605597 last 2 update polls, reset availability
606598 """
607599 self ._run_update_thread = True
0 commit comments