Advanced Flow — Community Q&A (from Ask Me Anything 05-07-2022)

You can create a loop within Advanced Flows quite easily using the ‘Countdown timers’ app.

Just add 'an additional ‘if’ with a specific ‘hourglass being empty’, which is triggered and reset elsewhere in your main flow…

1 Like

Hello,

I’m testing the advance flow for a few days now. IT IS GREAT. Had to get use to how to use the statement but now ik know it is just great.

I got two remark.

  1. I can Add the Wait statement. IT would be great to have the Option to use Variables in the wait statement.

  2. it woud be nice to have the option to make a loop.

Thanks for the great work.

Greetings Ronald

1 Like

While waiting for it to be implemented :wink:

image

(This will be in milliseconds, so a value of 500 waits for half a second)

6 Likes

thanks for the workaround. this works great

During the AMA on 5-7-'22, someone asked if there is gonna be a “Dim all lights in a Room” card.
Just in case that person also reads this forum: The App Device capabilities (Apparaat mogelijkheden) has the functionality to set devices in rooms based on there capabilities.

Just use the “Set [[capability]] to [[percentage]] in [[zone]] including subzones ([[subzones]])” card.

Device Capabilities - Enhance the capabilities of devices - Apps - Homey Community Forum

4 Likes

Hey @Emile,

In the AMA of 5-7-'22 at about 1:01:30, you are responding to a question about local variables.
I also have allready asked that question to you on the other forum-thread, but i will ask it again with a better decription and example.

Because at 1:01:50, you say that the local tags can be modified. I think you misspoke here, because as far as i know, tags cannot be changed: using for example the “Read as JSON and set PATH to […]” will create a new (modified) tag.
And this creates a “problem”.

But maybe i am missing something? In the AMA you talked about modifying the Tag.
Is there a way of modifying a Tag within a flow (and thuse: not creating a new modified Tag)?


So i will now try to explain what people, or at least i, mean bij local variables: Scoped variables/tags that are mutable/modifiable and bound to the flow-execution.

Why would you need this?

So i can set scoped variables based on if-then-else statements or assign default values in case there are errors.

Here is an example. In this example, there are three Text-Tags generated.

  • The first one will stay the same
  • The second and third are changed, buth there is no way to use those Tags in a recombining flowline.

I have a lott of real use-cases. Like this example, after changing the Tag, i cannot recombine the three lines into one card, because it would not know which Tag to use.

The only way to “modify” and “re-use” a value throughout the flow, is to put it in a variable, recombine the lines and re-read the variable.
Problem is, this is not scoped: running the flow multiple times paralel (fastly triggered for example) would change the variable during the flow execution for al flow-instances.

Here one more example of the pain to update variables throughout the flow, just to set default parameters, and still: this is not scoped and could give issues when executed paralel to each other.

@Arie_J_Godschalk you’re right, of course! I didn’t think about that during the AMA.

I’m not saying we will add local variables someday, but it sure is noted as a requested addition :slight_smile:

8 Likes

Thanks Adrian for replying to me, Its indeed too late to change the default reactions of the script. It was just my logical opinion to my first experience of the script what feels logical to me.

Never the less I’m amazed what it can do and how it’s been graphical designed! Love the way athom creates logical functionality combined with a nice UI.

1 Like

AF is indeed nice feature, after playing around would be nice to see :

  • ability to align and/or space evenly selected items
  • auto align whole flow
  • one error card by default (ANY error on flow) - eg. when I have x conditions,y actions, I would like to be informed just in case anything fails without need to connect everything manually
  • copy / paste from standard flows so we can speed-up on flow migrations :slight_smile: - per item or if not possible, simply option for whole standard flow - Copy as Advanced flow
  • ability to see triggers per items (like you can see count of flow triggers) - at least as option for diagnosing flows - or even heat map would be really nice :wink:
  • move selected items by arrows on keyboard
  • when placing an item (And, then…) into existing connection line, to auto-connect automatically if inserted on line/connection… useful for ALL/ANY or when adding new condition - now it requires first deletion of existing connection and then manually connect (twice at minimum…)
  • ability to drag line/connection from True to False (now you have to delete line first)
  • adding workspace movement ability to mouse right button if pressed in empty space - currently it"s working with space bar only
  • would be nice to better see more significant differences between Standard and Advanced flows - currently it’s just about :
    obrazek - maybe just by a color ?
  • ability to auto-save (eg. popup after 15min?) or recover when session / browser crash

Btw I really thinks that AF may help optimizing overall CPU usage (peaks) of Homey because with AF, I can replace eg. 10 flows with one, which has one trigger and only one path for execution, while previously I had 10 (same) triggers which triggered all 10 flows but only 1 executed.

5 Likes

Hi Sharkys, thanks! Same idea here. Really nice to play with, but it ends in a mess rather quickly for chaotics like me.

+1 to all of your points, and I’d like to add:

  1. Dragging the canvas with the mouse, just like you can drag cards. Especially left-right. Now it can be moved by fake selecting and hover the left or right border, but that’s an odd procedure. EDIT: It’s explained in the vid: Spacebar + left-click & hold = drag
  2. All space is expensive (we’re not all on 4K 38" displays):
    A ‘hide’ button on the Flow overview panel on the left (same as at the bottom of the menu of the developer page), and even one on the icon panel too.
  3. Automatically let the connection lines go around/along the devices and other lines, not behind them
  4. Ability to (in edit mode) draw horizontal / vertical (dotted) lines on the canvas
  5. Make the lines go brighter / blink / dottet / change color, when hovering and/or selected with the mouse
  6. Don’t make the delete button (the cross) to remove a line disappear behind a device! Maybe two crosses in its place is an idea: one at the output and one at the input.
  7. Be able to make notes narrower/wider, or the width depending on the text (up to a maximum of the flowchart width)
  8. Can the Save button of the standard flow editor also be positioned at the top? It’s getting confusing now, when often switching between standard and advanced (or I’m just getting an old sod :sweat_smile: ) ‘CTRL+s’ does the job
  9. Option to disable cards, like timeline cards, or the siren card (to be able to test a flow (not the simulation) in peace and quiet :upside_down_face:)
5 Likes

@Dijker
Don’t know if this is the right place but I saw a YouTube clip with a couple of tips.
If this is the wrong place, you can remove it.
https://youtu.be/L8LBou635Gs

3 Likes

I thought of:
Add all error tags to the notification card. It then will only send the first occuring error (assumption), which makes sense. Solve the error, and any other error will notify you when the flow ran again.

Apologies if this was addressed already, couldn’t find it:
@Emile it is not clear, which error comes from what card? Hovering does not return a (card or device)name.

Can this be programmed like the variable tags? They are kind to us and return the device name when hovering:

Screenshot from 2022-07-08 15-38-02

Thanks,
~Peter

1 Like

+1 for both of your points.

Also I like to see a simple math card where u can enter a Formula from tags and it will give you a result card. currently using a Homey Script Card
image

it would be awesome if there is a possibility to group a set of cards.
this would give you a set of possibilities as: 1 line to those groups, moving the groups easily, and keep it more organized.

1 Like

You can do that temporary by dragging a selection around it, including the ‘any’ blocks. You can add other objects by “CTRL”+click.
After that you can drag the whole selection as one object

Screenshot from 2022-07-08 17-56-53

1 Like

Not sure what you mean, but this won’t do? It updates a var ([Rolgordijn_%_open]) which you can use in following cards.

Screenshot from 2022-07-08 18-08-27

I want to have a card that doesn’t need a global var. That’s why I use a Homey Script, so I have the result only for that one flow.

1 Like

Ah I see…
I think this is related:

1 Like

Technically you don’t need to use HomeyScript for this (I like the out of the box thinking though), you can use normal logic cards, but it will take 2 cards:
local number example
first card = create TEKST as text-tag (THEN card), where you can calculate in.
second card = convert TEKST into a number tag (THEN card)

1 Like

That is one way :slight_smile:

I keep the homey script way, one card less :slight_smile:
image
It has only to be parsed since it get already calculated with the input.

@Peter_Kawa i didn’t saw that :slight_smile: But that’s what I kinda wanted :slight_smile:

1 Like