Skip to content

Commit 67fb591

Browse files
committed
Add timer and schedule
1 parent c34f0a9 commit 67fb591

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

dingz/constants.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
MOTION = "motion"
2020
DEVICE_INFO = "device"
2121
LIGHT = "light"
22+
SCHEDULE = "schedule"
23+
TIMER = "timer"
2224

2325
# Special endpoints
2426
LOG = "/log"

dingz/dingz.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
TEMPERATURE,
2020
THERMOSTAT_CONFIGURATION,
2121
WIFI_SCAN,
22+
TIMER,
23+
SCHEDULE,
2224
)
2325

2426
_LOGGER = logging.getLogger(__name__)
@@ -81,6 +83,8 @@ async def get_configuration(self, part) -> None:
8183
"pir": PIR_CONFIGURATION,
8284
"thermostat": THERMOSTAT_CONFIGURATION,
8385
"input": INPUT_CONFIGURATION,
86+
"timer": TIMER,
87+
"schedule": SCHEDULE,
8488
}
8589
url_part = [value for key, value in urls.items() if part in key][0]
8690
url = URL(self.uri).join(URL(url_part))

example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ async def main():
1919
print("All device details:", dingz.settings)
2020

2121
# Get the configuration
22-
# Available: pir, input, themostat
22+
# Available: pir, input, themostat, timer, schedule
2323
await dingz.get_configuration("pir")
2424
print("Configuration:", dingz.configuration)
2525

0 commit comments

Comments
 (0)