From 3adc3d93a5475e054c06d8700964412f5068eea6 Mon Sep 17 00:00:00 2001 From: Joshua Mulliken Date: Mon, 28 Jun 2021 20:39:03 -0400 Subject: [PATCH] fix: Add sensor service to Wyzeapy --- setup.cfg | 2 +- sonar-project.properties | 2 +- src/wyzeapy/__init__.py | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 237d740..444842b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,7 @@ [metadata] # replace with your username: name = wyzeapy -version = 0.1.0-beta.6 +version = 0.1.0-beta.7 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 561ea85..250be98 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.6 +sonar.projectVersion=0.1.0-beta.7 # 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 791201e..50062a2 100644 --- a/src/wyzeapy/__init__.py +++ b/src/wyzeapy/__init__.py @@ -27,6 +27,7 @@ def __init__(self): self._thermostat_service = None self._hms_service = None self._lock_service = None + self._sensor_service = None @classmethod async def create(cls): @@ -88,3 +89,9 @@ async def lock_service(self) -> LockService: if self._lock_service is None: self._lock_service = LockService(self._client) return self._lock_service + + @property + async def sensor_service(self) -> SensorService: + if self._sensor_service is None: + self._sensor_service = SensorService(self._client) + return self._sensor_service