My Fibaro Dimmer 2 DTH has a schedule to manage the nightmode feature. I encapsulated the unshedule() and schedule() calls in a private helper function manageSchedules(), which I decided to trigger from the updated() method, as the user needs to set a time for the schedule in the settings page and updated() runs after any settings are saved. There’s no harm in calling it from the installed() command too, which is run after the device handler is installed.
zcapr17
(codersaur)
2
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| runPeriodically(), runEvery1Hour() scheduler questions | 6 | 2191 | July 1, 2016 | |
| Scheduled polling in a device handler | 21 | 5307 | February 10, 2018 | |
| Schedule() runs but is not sending commands to device | 8 | 1756 | February 24, 2017 | |
| How to schedule a handler that running everyday at 00:00 based on the hub location timezone? | 7 | 1345 | February 1, 2016 | |
| Scheduled Jobs in DTH | 0 | 430 | May 18, 2017 |