gboudreau / nest-api

Unofficial Nest Learning Thermostat API
GNU Lesser General Public License v3.0
300 stars 93 forks source link

Add invoke_timestamp to device schedule #129

Closed bauzer714 closed 4 years ago

bauzer714 commented 4 years ago

Adding the parameter to support user implemented logic after use of the getNextScheduledEvent function without needing to replicate or override the function. Includes support for past scheduled events of "today" to prevent next from being a past timestamp.

Example: If today was Monday at 0800 with a device that has scheduled event on Friday 0900, the object returned indicates that the next scheduled event time is at 32400, but it's not immediately able to determine if that event is in 1 hour or days away.