Extends from Homey App, Homey Device or Homey Driver.
Clears an active interval associated with the given key. The key must be that used in the IntervalConfigurationCollection.
The unique key representing the interval to clear.
A promise that resolves once the interval has been cleared.
Restarts intervals that have been configured with the provided function names.
Rest
...functionNames: (keyof T & string)[]The names of the functions to restart intervals for.
A promise that resolves when the restart process is complete.
Restarts intervals that have been configured with the provided setting names. This is useful for use with
Device.onSettings
.
Rest
...settingNames: (undefined | (T extends DeviceThe names of the settings to restart the system by.
Sets an interval identified by the given key and starts it. The key must be that used in the IntervalConfigurationCollection.
The identifier for the interval to be set and started.
A promise that resolves once the interval has been started.
Starts the specified intervals (by keys) or all managed intervals if no keys are provided.
Rest
...keys: string[]The interval keys to start. If no keys are provided, all managed intervals are started.
A promise that resolves when the intervals have been started.
Stops the intervals associated with the provided keys. If no keys are provided, all managed intervals are cleared.
Rest
...keys: string[]The keys for intervals that need to be stopped. If no keys are provided, all managed intervals will be stopped.
A promise that resolves when the intervals have been cleared.
Manages intervals for a given Homey device, allowing for starting, stopping, and restarting intervals based on configuration and device settings. This is useful for cases like when you need an OAuth2Device that polls multiple API endpoints in the background.