ManagerLedring

You can access this manager through the Homey instance as this.homey.ledring

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 r, g and b property, which are numbers between 0 and 255.

priority
string

How high the animation will have on the priority stack. Can be either INFORMATIVE, FEEDBACK or CRITICAL.

transition
number

Transition time (in ms) how fast to fade the information in. Defaults to 300.

duration
number | Boolean

Duration (in ms) how long the animation should be shown. Defaults to false. false is required for screensavers.

options
object
fps
number

Frames per second

tfps
number

Target frames per second (must be divisible by fps)

rpm
number

Rotations per minute

}
}

Returns

Promise.<LedringAnimation>

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 INFORMATIVE, FEEDBACK or CRITICAL.

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 colorwipe, loading, off, progress, pulse, rainbow, rgb or solid.

opts
object
priority
string

How high the animation will have on the priority stack. Can be either INFORMATIVE, FEEDBACK or CRITICAL.

duration
number | boolean

Duration (in ms) how long the animation should be shown. Defaults to false. false is required for screensavers.

}

Returns

Promise.<LedringAnimation>

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

Promise.<LedringAnimation>

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 app.json.

animation
LedringAnimation

Returns

Promise.<any>

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

Promise.<LedringAnimation>

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 app.json.

animation
LedringAnimation

Returns

Promise.<any>