File tree Expand file tree Collapse file tree 4 files changed +29
-1
lines changed
Expand file tree Collapse file tree 4 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ class NodeFeature(str, Enum):
5454 SWITCH = "switch"
5555 SENSE = "sense"
5656 TEMPERATURE = "temperature"
57+ CIRCLEPLUS = "circleplus"
5758
5859
5960class NodeType (Enum ):
@@ -83,6 +84,7 @@ class NodeType(Enum):
8384 NodeFeature .TEMPERATURE ,
8485 NodeFeature .SENSE ,
8586 NodeFeature .SWITCH ,
87+ NodeFeature .CIRCLEPLUS ,
8688)
8789
8890
Original file line number Diff line number Diff line change 1414from ..messages .responses import NodeResponseType
1515from .circle import PlugwiseCircle
1616from .helpers .firmware import CIRCLE_PLUS_FIRMWARE_SUPPORT
17-
17+ from . helpers import raise_not_loaded
1818_LOGGER = logging .getLogger (__name__ )
1919
2020
@@ -37,6 +37,7 @@ async def load(self) -> bool:
3737 NodeFeature .RELAY_LOCK ,
3838 NodeFeature .ENERGY ,
3939 NodeFeature .POWER ,
40+ NodeFeature .CIRCLEPLUS ,
4041 ),
4142 )
4243 if await self .initialize ():
@@ -121,3 +122,18 @@ async def clock_synchronize(self) -> bool:
121122 self .name ,
122123 )
123124 return False
125+
126+ @raise_not_loaded
127+ async def enable_auto_join (self ) -> bool :
128+ """Enable Auto Join."""
129+ _LOGGER .warning ("Auto Joining Started" )
130+ return True
131+
132+ # region properties
133+ @property
134+ def auto_join (self ) -> bool :
135+ """Auto Join Attribute."""
136+ _LOGGER .warning ("Auto Joining Started" )
137+ return True
138+
139+ # end region
Original file line number Diff line number Diff line change @@ -167,6 +167,7 @@ class SupportedVersions(NamedTuple):
167167 NodeFeature .MOTION : 2.0 ,
168168 NodeFeature .MOTION_CONFIG : 2.0 ,
169169 NodeFeature .SWITCH : 2.0 ,
170+ NodeFeature .CIRCLEPLUS : 2.0 ,
170171}
171172
172173# endregion
Original file line number Diff line number Diff line change @@ -320,6 +320,15 @@ def sense(self) -> SenseStatistics:
320320 f"Sense statistics is not supported for node { self .mac } "
321321 )
322322
323+ @property
324+ @raise_not_loaded
325+ def auto_join (self ) -> bool :
326+ """Enable Auto Join."""
327+ if NodeFeature .CIRCLEPLUS not in self ._features :
328+ raise FeatureError (f"Auto-Joining is not supported for node { self .mac } " )
329+ raise NotImplementedError ()
330+
331+
323332 # endregion
324333
325334 def _setup_protocol (
You can’t perform that action at this time.
0 commit comments