Skip to content

Commit edc3907

Browse files
committed
trying to find a possible root cause for the C+ fetching error
1 parent effe3a4 commit edc3907

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

plugwise_usb/api.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,13 @@ def temperature(self) -> float:
415415
Raises NodeError when temperature feature is not present at device.
416416
"""
417417

418+
@property
419+
def auto_join(self) -> bool:
420+
"""Last received auto_join state.
421+
422+
Raises NodeError when circleplus feature is not present at device.
423+
"""
424+
418425
# endregion
419426

420427
# region control

plugwise_usb/nodes/circle.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from __future__ import annotations
44

5+
from abc import ABC
56
from asyncio import Task, create_task
67
from collections.abc import Awaitable, Callable
78
from dataclasses import replace
@@ -72,7 +73,7 @@ def decorated(*args: Any, **kwargs: Any) -> Any:
7273
return cast(FuncT, decorated)
7374

7475

75-
class PlugwiseCircle(PlugwiseBaseNode):
76+
class PlugwiseCircle(PlugwiseBaseNode, ABC):
7677
"""Plugwise Circle node."""
7778

7879
def __init__(
@@ -183,6 +184,16 @@ def relay_lock(self) -> RelayLock:
183184
"""State of the relay lock."""
184185
return self._relay_lock
185186

187+
@property
188+
@raise_not_loaded
189+
def auto_join(self) -> bool:
190+
"""Enable Auto Join."""
191+
if NodeFeature.CIRCLEPLUS not in self._features:
192+
raise FeatureError(
193+
f"Auto-Joining is not supported for node {self.mac}"
194+
)
195+
raise NotImplementedError()
196+
186197
# endregion
187198

188199
async def calibration_update(self) -> bool:

0 commit comments

Comments
 (0)