Constructor
new Homey.LedringAnimation(opts)
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
Object
|
|
Methods
register(callbackopt) → {Promise}
Register the animation. This is a shorthand method to ManagerLedring#registerAnimation.
Parameters:
Name | Type | Attributes | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
callback |
function
|
<optional> |
|
Returns:
- Type:
-
Promise
registerScreensaver(screensaverName, callbackopt) → {Promise}
Register this animation as a screensaver. This is a shorthand method to ManagerLedring#registerScreensaver.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
screensaverName |
String
|
The name of the screensaver, as defined in |
|
callback |
genericCallbackFunction
|
<optional> |
Returns:
- Type:
-
Promise
start(callbackopt) → {Promise}
Start the animation.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
genericCallbackFunction
|
<optional> |
Returns:
- Type:
-
Promise
stop(callbackopt) → {Promise}
Stop the animation.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
genericCallbackFunction
|
<optional> |
Returns:
- Type:
-
Promise
unregister(callbackopt) → {Promise}
Unregister the animation. This is a shorthand method to ManagerLedring#unregisterAnimation.
Parameters:
Name | Type | Attributes | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
callback |
function
|
<optional> |
|
Returns:
- Type:
-
Promise
unregisterScreensaver(screensaverName, callbackopt) → {Promise}
Unregister this animation as a screensaver. This is a shorthand method to ManagerLedring#unregisterScreensaver.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
screensaverName |
String
|
The name of the screensaver, as defined in |
|
callback |
genericCallbackFunction
|
<optional> |
Returns:
- Type:
-
Promise
updateFrames(frames, callbackopt) → {Promise}
Update the animation frames.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
frames |
Array
|
||
callback |
genericCallbackFunction
|
<optional> |
Returns:
- Type:
-
Promise
Events
.on('finish')
When the animation has finished (duration has been reached)
.on('start')
When the animation has started
.on('stop')
When the animation has stopped