ManagerFlow
homey.manager.flow
Manages flows in this app.
You can access this manager through the Homey instance as self.homey.flow.
Ancestors
- Manager
- SimpleClass
- homey.util.event_emitter.EventEmitter
- typing.Generic
- abc.ABC
Methods
get_action_card
def get_action_card(self, id: str) ‑> FlowCardActionGet the action flow card with the given ID, as defined in app.json.
get_condition_card
def get_condition_card(self, id: str) ‑> FlowCardConditionGet the condition flow card with the given ID, as defined in app.json.
get_trigger_card
def get_trigger_card(self, id: str) ‑> FlowCardTriggerGet the trigger flow card with the given ID, as defined in app.json.
get_device_trigger_card
def get_device_trigger_card(self, id: str) ‑> FlowCardTriggerDeviceGet the device trigger flow card with the given ID, as defined in app.json.
create_token
async def create_token(self,id: str,
type: "Literal['string', 'number', 'boolean', 'image']",
title: str,
value: Any | None = None) ‑> FlowToken
Create a flow token, which can be used to create a tag in the flow editor.
Args
| Name | Type | Description |
|---|---|---|
type |
"Literal['string', 'number', 'boolean', 'image']" | The type of values assignable to the token. Can be "string", "number", "boolean", or "image" |
Returns
A FlowToken of the given type.
get_token
def get_token(self, id: str) ‑> FlowTokenGet the token with the given ID, as set in create_token.
unregister_token
async def unregister_token(self, token: FlowToken) ‑> NoneUnregister the given token.
Args
| Name | Type | Description |
|---|---|---|
token |
FlowToken | The FlowToken to unregister. |
Raises
NotRegistered- Raised if the token is not registered.