FlowCardAction
homey.flow_card_action
A flow card with type action, as defined in the app's app.json.
Ancestors
- FlowCard
- SimpleClass
- homey.util.event_emitter.EventEmitter
- typing.Generic
- abc.ABC
Methods
register_run_listener
def register_run_listener(self, listener: RunListener[None | dict]) ‑> SelfRegister a listener for when this flow card is activated. Raising an exception in the listener will make the flow fail with the exception's message.
Args
| Name | Type | Description |
|---|---|---|
listener |
RunListener[None | dict] | An async listener ran when the flow card is activated. It receives the arguments of the flow card, and arguments passed when triggering the flow card. If tokens have been defined to make this an advanced flow it returns the tokens. |
Returns
This flow card, for chained calls.
Raises
AlreadyExists- Raised if a listener was already registered for this flow card.