Change a Homey advanced flow
homey_advancedflow_updateReplace an advanced flow's entire card graph, defining branches, parallel paths, delays, and error handlers with labeled cards. Read current flow first to preserve unchanged cards.
Instructions
An advanced flow is a graph of cards rather than one trigger and a list of actions: branches, parallel paths, joins, delays and error handlers. Give each card your own label and refer to those labels in the output lists; real ids are generated before sending. To use a value another card produced, write [[trigger::<that card's label>::]] or [[action::::]]. The [[owner|token]] form used in standard flows does not name a card and will not work here. The whole graph is replaced, so every card that should survive has to be sent again: read the current one with homey_flow_get first. A flow this server did not create needs confirm: true. Switching a flow that is off ON needs confirmEnable: true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flow | Yes | The advanced flow name or id to change. | |
| name | No | A new name. Leave out to keep the current one. | |
| cards | Yes | The complete new graph. | |
| confirm | No | Required when the flow was not created by this server. | |
| enabled | No | Switch the flow on or off. Switching it OFF is always allowed. Switching a flow that is currently off ON is refused unless confirmEnable is also true, because a flow arrives switched off so that a person reads what it does before it can run the house, and this is that step. Ask the owner; do not confirm it on their behalf. | |
| confirmEnable | No | Required only when enabled is true and the flow is currently off. Set it after the owner has seen what the flow does and said to switch it on, never merely because the flow looks finished. |