Skip to content

Commit

Permalink
Add on attribute to camera and switch
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Mulliken committed Jun 29, 2021
1 parent 4277d05 commit 22b5b81
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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=.
Expand Down
6 changes: 6 additions & 0 deletions src/wyzeapy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@


class Wyzeapy:
"""A module to assist developers in interacting with the Wyze service"""
_client: Client

def __init__(self):
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/wyzeapy/services/camera_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
6 changes: 4 additions & 2 deletions src/wyzeapy/services/switch_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 22b5b81

Please sign in to comment.