Skip to content

Commit 0da6854

Browse files
committed
Add motion
1 parent eaff201 commit 0da6854

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

dingz/dingz.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def __init__(self, host: str, session: aiohttp.client.ClientSession = None) -> N
3939
self._day = None
4040
self._night = None
4141
self._hour_of_day = None
42+
self._motion = None
4243
self.uri = URL.build(scheme="http", host=self._host).join(URL(API))
4344

4445
async def get_device_info(self) -> None:
@@ -76,7 +77,6 @@ async def get_light(self) -> None:
7677
"""Get the light details from the switch."""
7778
url = URL(self.uri).join(URL(LIGHT))
7879
response = await make_call(self, uri=url)
79-
print(response)
8080
self._intensity = response["intensity"]
8181
self._hour_of_day = response["state"]
8282

@@ -118,6 +118,11 @@ def temperature(self) -> float:
118118
"""Return the current temperature in celsius."""
119119
return round(self._temperature, 1)
120120

121+
@property
122+
def motion(self) -> bool:
123+
"""Return true if the sensor is detecting motion."""
124+
return None
125+
121126
@property
122127
def day(self) -> bool:
123128
"""Return true if the sensor thinks it's day."""

0 commit comments

Comments
 (0)