How to run an automation within a scene?

If All you wanted was to run an automation that you would create with the normal “add automation“ option in the new V3 app, then you would have that automation run when a virtual switch came on, and put turning the virtual switch into your scene.

However, what you have described is not a standard Automation created in that way because of the else condition.

For that, you need to use either webcore or the rules API.

I’m still not quite sure why you would want to trigger that from a scene, but if you did, you could then use the same method of making one of the trigger conditions a virtual switch.