ManagerFlow

homey.manager.flow

Manages flows in this app. You can access this manager through the Homey instance as self.homey.flow.

Ancestors

Methods

get_action_card

def get_action_card(self, id: str) ‑> FlowCardAction

Get the action flow card with the given ID, as defined in app.json.

get_condition_card

def get_condition_card(self, id: str) ‑> FlowCardCondition

Get the condition flow card with the given ID, as defined in app.json.

get_trigger_card

def get_trigger_card(self, id: str) ‑> FlowCardTrigger

Get 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) ‑> FlowCardTriggerDevice

Get 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

NameTypeDescription
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) ‑> FlowToken

Get the token with the given ID, as set in create_token.

unregister_token

async def unregister_token(self, token: FlowToken) ‑> None

Unregister the given token.

Args

NameTypeDescription
token FlowToken The FlowToken to unregister.

Raises

NotRegistered
Raised if the token is not registered.

Inherited members