Constructor
new Homey.FlowCardTriggerDevice(id)
Parameters:
| Name | Type | Description | 
|---|---|---|
| id | string | The ID of the card as defined in the app's  | 
Extends
Methods
getArgumentValues(callbackopt) → {Promise}
Get the current argument values of this card, as filled in by the user.
- Overrides:
Parameters:
| Name | Type | Attributes | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| callback | function | <optional> | 
 | 
Returns:
- Type:
- 
        
Promise
register() → {FlowCard}
Register the Card. This is a shorthand method for ManagerFlow#registerCard.
- Overrides:
Returns:
- Type:
- 
        
FlowCard
registerRunListener(fn) → {FlowCard}
Register a listener for a run event.
Return a Promise, or run the callback.
- Overrides:
Parameters:
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| fn | function | 
 | 
Returns:
- Type:
- 
        
FlowCard
trigger(device, tokens, state, callback) → {Promise}
Trigger this card to start a Flow
- Overrides:
Parameters:
| Name | Type | Description | 
|---|---|---|
| device | Device | A Device instance | 
| tokens | Object | An object with tokens and their typed values, as defined in an app's  | 
| state | Object | An object with properties which are accessible throughout the Flow | 
| callback | genericCallbackFunction | 
Returns:
- Type:
- 
        
Promise
Returns a promise when callback is omitted
unregister()
Unregister the Card. This is a shorthand method for ManagerFlow#unregisterCard.
- Overrides:
Events
.on('update')
This event is fired when the card is updated by the user (e.g. a Flow has been saved).
- Overrides:
 You are currently viewing the Homey Apps SDK v2 documentation. New apps should use Homey Apps SDK v3 ››
      You are currently viewing the Homey Apps SDK v2 documentation. New apps should use Homey Apps SDK v3 ››