Starting a flow from a Virtual Device with Number TAG

Hi,
For my Roborock vacuum I would like to set up a VD for each room and then when I press the VD for a room pass a number from the VD to the Flow. That number will then be used for a very simple flow which cleans the room associated with that number.
Is that possible?

The flow card “Start flow with number” ?

Flows for the VDs:

When…
– VD/Button no. 1 is pushed
Then…
– Logic: Set variable Roborock to 1 (= room 1)

When…
– VD/Button no. 2 is pushed
Then…
– Logic: Set variable Roborock to 2 (= room 2)

And so on…

Flow(s) for cleaning the rooms:
When…
– Logic: Variable Roborock has changed
And…
– Logic: Variable Roborock is 1
Then…
– Clean room 1

When…
– Logic: Variable Roborock has changed
And…
– Logic: Variable Roborock is 2
Then…
– Clean room 2

And so on…

Yes, that’s what I want to use, but how do you pass the number. So if I have a VD which says vacuum the dining room which is room number 18, how do I pass the 18 to the flow?

In my opinion the Start flow with number flow card is not for using this number for further use.
But you can use this flow card in the same way like the Variable has changed flow card.

Flow 1
When…
– VD/Button no. 1 is pushed
Then…
– Start Flow “Roborock” with no. 1

Flow 2
When…
– This flow is started with a number tag
And…
– Start value is 1
Then…
– Clean room 1

Wouldn’t it be much more simple to do this?

When VD button 1 is pressed
Then clean room 1

You just fill in 18 :face_with_raised_eyebrow: ?
And then make a flow which start with the card “This flow is started with a number tag” and use the tag “start value”

Let me think about that… :thinking:

Yes! :joy:

Yeh OK, I get it, and in the end this is what I did. But I can’t help thinking that if such a card exists “Start flow with number” then there must be a way of passing a parameter when starting the flow so that the Start Value takes on that number. Yet I can’t seem to find any reference on how to do that. Maybe it can be done from a Script.

You first start that flow from another flow via the THEN card ‘Start [flow name] with [number]’ in which you provide the number tag.

The flow that you are trying to call needs to start with the WHEN card ‘This flow is started with a number tag.

You can then check which number was passed to the flow by checking the ‘Start value’ tag.

Got it. Thanks