Flows for virtual switch

I wrote some lines about how I deal with complex flows “how to structure your flows”

What I do in the case you describe: do not create virtual switches. Create virtual pushbuttons. These do not have a status so you don’t need to return the status them.

So:
When virtual pushbutton is pressed
AND light status is ON
THEN

When virtual pushbutton is pressed
ANd light status is OFF
THEN

PS: yes you can build the second flow i to the first flow in the ELSE section.
Please read the “how to structure your flows” to understand why I do not do it…