ManagerFlow

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

Methods

createToken

(async) createToken(id, opts): Promise.<FlowToken>

The FlowToken class can be used to create a Tag in the Flow Editor.

Parameters

Name Type Description
id
string

ID of the token, should be alphanumeric.

opts
object
type
string

Type of the token, can be either string, number, boolean or image.

title
string

Title of the token

}

Returns

Promise.<FlowToken>

getActionCard

getActionCard(id): FlowCardAction

Parameters

Name Type Description
id
string

The ID of the card as defined in the app's app.json.

Returns

getConditionCard

getConditionCard(id): FlowCardCondition

Parameters

Name Type Description
id
string

The ID of the card as defined in the app's app.json.

Returns

getDeviceTriggerCard

getDeviceTriggerCard(id): FlowCardTriggerDevice

Parameters

Name Type Description
id
string

The ID of the card as defined in the app's app.json.

Returns

getTriggerCard

getTriggerCard(id): FlowCardTrigger

Parameters

Name Type Description
id
string

The ID of the card as defined in the app's app.json.

Returns

unregisterToken

(async) unregisterToken(tokenInstance): Promise.<any>

Unregister a FlowToken.

Parameters

Name Type Description
tokenInstance
FlowToken

Returns

Promise.<any>