diff --git a/setup.cfg b/setup.cfg index 24649e9..237d740 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,7 @@ [metadata] # replace with your username: name = wyzeapy -version = 0.1.0-beta.5 +version = 0.1.0-beta.6 author = Mulliken LLC author_email = joshua@mulliken.net description = Python client for private Wyze API diff --git a/sonar-project.properties b/sonar-project.properties index f2e4e03..561ea85 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -3,7 +3,7 @@ sonar.organization=joshuamulliken # This is the name and version displayed in the SonarCloud UI. sonar.projectName=wyzeapy -sonar.projectVersion=0.1.0-beta.5 +sonar.projectVersion=0.1.0-beta.6 # Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. #sonar.sources=. diff --git a/src/wyzeapy/__init__.py b/src/wyzeapy/__init__.py index 47e92da..791201e 100644 --- a/src/wyzeapy/__init__.py +++ b/src/wyzeapy/__init__.py @@ -16,6 +16,7 @@ class Wyzeapy: + """A module to assist developers in interacting with the Wyze service""" _client: Client def __init__(self): @@ -29,6 +30,11 @@ def __init__(self): @classmethod async def create(cls): + """ + Creates the Wyzeapy class + + :return: An instance of the Wyzeapy class + """ self = Wyzeapy() self._client = Client("", "") return self diff --git a/src/wyzeapy/services/camera_service.py b/src/wyzeapy/services/camera_service.py index 88a764e..56584fd 100644 --- a/src/wyzeapy/services/camera_service.py +++ b/src/wyzeapy/services/camera_service.py @@ -18,6 +18,7 @@ def __init__(self, dictionary: Dict[Any, Any]): self.last_event: Optional[Event] = None self.last_event_ts: int = int(time.time() * 1000) + self.on: bool = True class CameraService(BaseService): diff --git a/src/wyzeapy/services/switch_service.py b/src/wyzeapy/services/switch_service.py index 4386b81..f848de1 100644 --- a/src/wyzeapy/services/switch_service.py +++ b/src/wyzeapy/services/switch_service.py @@ -3,14 +3,16 @@ # of the attached license. You should have received a copy of # the license with this file. If not, please write to: # joshua@mulliken.net to receive a copy -from typing import List +from typing import List, Dict, Any from wyzeapy.services.base_service import BaseService from wyzeapy.types import Device, DeviceTypes, PropertyIDs class Switch(Device): - pass + def __init__(self, dictionary: Dict[Any, Any]): + super().__init__(dictionary) + self.on: bool = False class SwitchService(BaseService):