The implemented cluster.
Access the behavior's events.
Supported features as a flag object.
Protected
internalAccess the behavior's state.
Static
Readonly
clusterBase cluster state include all attribute values but may be extended by subclasses.
Static
Readonly
defaultsStatic
Optional
Readonly
dependenciesStatic
Readonly
earlyStatic
Readonly
ExtensionStatic
Readonly
idThe behavior ID for ClusterBehaviors is the name of the cluster.
Static
Readonly
InterfaceStatic
Readonly
nameStatic
Optional
Readonly
schemaStatic
Readonly
supervisorStatic
supportsDoes this behavior support functionality of a specific implementation?
Protected
callbackCreate a generic callback function that has the same properties as a Reactor.
Like a reactor, the callback's "this" will be bound to an active Behavior instance. Because of this: The reactor MUST be a real JS function - arrow functions will not work!
Behaviors are ephemeral and should not perform initialization in their constructor. They can override this method instead.
This method may be synchronous or asyncronous. If asynchronous, the behavior will not be available for external use until initialization completes.
Protected
reactInstall a Reactor.
Important: The reactor MUST be a real JS function - arrow functions will not work!
Static
alterStatic
enableStatic
forStatic
setStatic
with
This is the default server implementation of SwitchBehavior.
This implementation includes all features of WindowCovering.Cluster and implements all mandatory commands. You should use WindowCoveringServer.with to specialize the class for the features your implementation supports.
To support all features and events the implementation adds some custom state attributes that can - or are required to - be used. These are:
rawPosition
- The raw position of the switch. This is the position as reported by the device and is not yet debounced. If the position is already debounced, just set thecurrentPosition
attribute. The debouncing uses thedebounceDelay
attribute value as timeframe in milliseconds and sets thecurrentPosition
attribute when the value is stable for this timeframe.debounceDelay
- The timeframe in milliseconds to wait until a newly reported position is considered stable.longPressDelay
- The timeframe in milliseconds to wait until a position is considered "long" pressed. This attribute is REQUIRED if the device supports the Momentary Switch LongPress (MSL) feature.multiPressDelay
- The timeframe in milliseconds starting with a stable release to detect multi-presses. This attribute is REQUIRED if the device supports the Momentary Switch MultiPress (MSM) feature.momentaryNeutralPosition
- The number of the position considered as the neutral position for the momentary switch. This defaults to position 0 but can be changed by settings this attribute. it is available as soon as the Momentary Switch (MS) feature is used.