Instance Methods
createAnimation
(async) createAnimation(opts): Promise.<LedringAnimation>Requires the
homey:manager:ledring
permission. For more information about permissions read the Permissions tutorial.
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
frames
|
Array.<LedringAnimation.Frame> | An array of frames. A frame is an Array of 24 objects with a |
priority
|
string | How high the animation will have on the priority stack. Can be either |
transition
|
number | Transition time (in ms) how fast to fade the information in. Defaults to |
duration
|
number | Boolean | Duration (in ms) how long the animation should be shown. Defaults to |
options
|
object | |
fps
|
number | Frames per second |
tfps
|
number | Target frames per second (must be divisible by fps) |
rpm
|
number | Rotations per minute |
|
||
|
Returns
createProgressAnimation
(async) createProgressAnimation(opts)Requires the
homey:manager:ledring
permission. For more information about permissions read the Permissions tutorial.
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
priority
|
string | How high the animation will have on the priority stack. Can be either |
options
|
object | |
color
|
string
default:#0092ff
|
A HEX string |
|
||
|
createSystemAnimation
(async) createSystemAnimation(systemId, opts): Promise.<LedringAnimation>Requires the
homey:manager:ledring
permission. For more information about permissions read the Permissions tutorial.
Parameters
Name | Type | Description |
---|---|---|
systemId
|
string | The system animation's ID. Can be either |
opts
|
object | |
priority
|
string | How high the animation will have on the priority stack. Can be either |
duration
|
number | boolean | Duration (in ms) how long the animation should be shown. Defaults to |
|
Returns
registerAnimation
(async) registerAnimation(animation): Promise.<LedringAnimation>Register a LED Ring animation.
Requires the
homey:manager:ledring
permission. For more information about permissions read the Permissions tutorial.
Parameters
Name | Type | Description |
---|---|---|
animation
|
LedringAnimation |
Returns
registerScreensaver
(async) registerScreensaver(name, animation): Promise.<any>Register a LED Ring screensaver.
Requires the
homey:manager:ledring
permission. For more information about permissions read the Permissions tutorial.
Parameters
Name | Type | Description |
---|---|---|
name
|
string | Name of the animation as defined in your app's |
animation
|
LedringAnimation |
Returns
unregisterAnimation
(async) unregisterAnimation(animation): Promise.<LedringAnimation>Unregister a LED Ring animation.
Requires the
homey:manager:ledring
permission. For more information about permissions read the Permissions tutorial.
Parameters
Name | Type | Description |
---|---|---|
animation
|
LedringAnimation |
Returns
unregisterScreensaver
(async) unregisterScreensaver(name, animation): Promise.<any>Unregister a LED Ring screensaver.
Requires the
homey:manager:ledring
permission. For more information about permissions read the Permissions tutorial.
Parameters
Name | Type | Description |
---|---|---|
name
|
string | Name of the animation as defined in your app's |
animation
|
LedringAnimation |