Class: Deferred

Deferred(keyopt, cacheObjopt)

Class that can be used to schedule a command or update to be sent to an Item later.

Constructor

new Deferred(keyopt, cacheObjopt)

Constructor
Parameters:
Name Type Attributes Description
key string <optional>
key for the backing map in the cache
cacheObj object <optional>
cache object to use
Source:

Methods

cancel(target)

Cancels the deferred actions for target, if there is one.
Parameters:
Name Type Description
target string name of the Item
Source:

cancelAll()

Cancels all the deferred actions.
Source:

defer(target, value, when, isCommand)

Creates a timer to command or update the update after a time. If the when is before now, sendCommand or postUpdate immediately.
Parameters:
Name Type Description
target string name of the Item to update or command
value string command or update to sendGatekeeper
when * time.toZDT compatible duration or date/time
isCommand boolean when true value is sent as a command
Source: