Constructor
new Homey.FlowToken(id, opts)
- Library:
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
id |
string
|
ID of the token, should be alphanumeric. |
|||||||||
opts |
Object
|
|
Methods
register(callbackopt) → {Promise}
Register the token. This is a shorthand method for ManagerFlow#registerToken.
Parameters:
Name | Type | Attributes | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
callback |
function
|
<optional> |
|
Returns:
- Type:
-
Promise
setValue(value, callbackopt) → {Promise}
Set or update the value of the token.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
value |
string
|
number
|
boolean
|
Image
|
The value of the token, should be of the same type as defined in the Token instance |
|
callback |
genericCallbackFunction
|
<optional> |
Returns:
- Type:
-
Promise
unregister(callbackopt) → {Promise}
Unregister the token. This is a shorthand method for ManagerFlow#unregisterToken.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
genericCallbackFunction
|
<optional> |
Returns:
- Type:
-
Promise