Skip to content

Commit 46f065b

Browse files
committed
Try alternative solution
1 parent d051f50 commit 46f065b

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

plugwise_usb/api.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from datetime import datetime
66
from enum import Enum, auto
77
import logging
8-
from typing import Any
8+
from typing import Any, Protocol
99

1010
_LOGGER = logging.getLogger(__name__)
1111

@@ -227,17 +227,9 @@ class EnergyStatistics:
227227
week_production_reset: datetime | None = None
228228

229229

230-
class PlugwiseNode:
230+
class PlugwiseNode(Protocol):
231231
"""Protocol definition of a Plugwise device node."""
232232

233-
def __init__(
234-
self,
235-
mac: str,
236-
address: int,
237-
loaded_callback: Callable[[NodeEvent, str], Awaitable[None]],
238-
) -> None:
239-
"""Initialize plugwise node object."""
240-
241233
# region Generic node properties
242234
@property
243235
def features(self) -> tuple[NodeFeature, ...]:

0 commit comments

Comments
 (0)