File tree Expand file tree Collapse file tree 2 files changed +2
-12
lines changed
Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Original file line number Diff line number Diff line change 99 The old methods are still available but will give a deprecate warning
1010 - Stick
1111 - ` devices ` (dict) - All discovered and supported plugwise devices with the MAC address as their key
12- - ` discovered_nodes ` (list) - List of MAC addresses of all discovered nodes
1312 - ` joined_nodes ` (integer) - Total number of registered nodes at Plugwise Circle+
1413 - ` mac ` (string) - The MAC address of the USB-Stick
1514 - ` network_state ` (boolean) - The state (on-line/off-line) of the Plugwise network.
Original file line number Diff line number Diff line change @@ -102,15 +102,6 @@ def devices(self) -> dict:
102102 """All discovered and supported plugwise devices with the MAC address as their key"""
103103 return self ._device_nodes
104104
105- @property
106- def discovered_nodes (self ) -> list :
107- """Return a list of mac addresses of all discovered and supported plugwise nodes."""
108- return list (
109- dict (
110- filter (lambda item : item [1 ] is not None , self ._device_nodes .items ())
111- ).keys ()
112- )
113-
114105 @property
115106 def joined_nodes (self ) -> int :
116107 """Return total number of nodes registered to Circle+ including Circle+ itself."""
@@ -692,7 +683,7 @@ def auto_update(self, timer=None):
692683 # Timer based on a minimum of 5 seconds + 1 second for each node supporting power measurement
693684 if not self ._auto_update_manually :
694685 count_nodes = 0
695- for mac in self .discovered_nodes :
686+ for mac in self ._device_nodes :
696687 if self ._device_nodes [mac ].measures_power :
697688 count_nodes += 1
698689 self ._auto_update_timer = 5 + (count_nodes * 1 )
@@ -799,7 +790,7 @@ def registered_nodes(self) -> int:
799790 def nodes (self ) -> list :
800791 """Return list of mac addresses of discovered and supported plugwise nodes."""
801792 _LOGGER .warning (
802- "Function 'nodes' will be removed in future, use the 'discovered_nodes' property instead !" ,
793+ "Function 'nodes' will be removed in future, use the 'devices' (dict) property instead !" ,
803794 )
804795 return list (
805796 dict (
You can’t perform that action at this time.
0 commit comments