Skip to content

Commit 0505bb8

Browse files
committed
Add support for getting the current settings
1 parent 0da6854 commit 0505bb8

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

dingz/dingz.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ def __init__(self, host: str, session: aiohttp.client.ClientSession = None) -> N
3232
self._host = host
3333
self._session = session
3434
self._device_details = None
35+
self._settings = None
3536
self._catch_all = {}
3637
self._button_action = None
3738
self._temperature = None
@@ -62,6 +63,11 @@ async def get_info(self) -> None:
6263
url = URL(self.uri).join(URL(endpoint))
6364
self._catch_all[endpoint] = await make_call(self, uri=url)
6465

66+
async def get_settings(self) -> None:
67+
"""Get the settings from the dingz."""
68+
url = URL(self.uri).join(URL(SETTINGS))
69+
self._settings = await make_call(self, uri=url)
70+
6571
async def get_temperature(self) -> None:
6672
"""Get the room temperature from the dingz."""
6773
url = URL(self.uri).join(URL(TEMPERATURE))
@@ -103,6 +109,11 @@ def device_details(self) -> str:
103109
"""Return the current device details."""
104110
return self._device_details
105111

112+
@property
113+
def settings(self) -> str:
114+
"""Return the current device settings."""
115+
return self._settings
116+
106117
@property
107118
def everything(self) -> str:
108119
"""Return the all available device details."""

0 commit comments

Comments
 (0)