Skip to content

Commit d81df15

Browse files
committed
Support for setting a timer
1 parent 5987d62 commit d81df15

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

dingz/dingz.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""A Python Client to interact with Dingz devices."""
22
import logging
3-
3+
import json
44
import aiohttp
55
from yarl import URL
66

@@ -136,6 +136,12 @@ async def turn_off(self) -> None:
136136
url = URL(self.uri).join(URL(FRONT_LED_SET))
137137
await make_call(self, uri=url, method="POST", data=data)
138138

139+
async def set_timer(self, data) -> None:
140+
"""Set a timer."""
141+
print(data)
142+
url = URL(self.uri).join(URL(TIMER))
143+
await make_call(self, uri=url, method="POST", json_data=data)
144+
139145
@property
140146
def device_details(self) -> str:
141147
"""Return the current device details."""

0 commit comments

Comments
 (0)