Virtual Dimmer's automation confuses Scene Switching

I have some smart lights that are controlled as a group by a virtual switch though the Smart Lighting app’s Mirror Behavior trigger (the lights mirror the switch state). I also have a few scenes for various combinations of these lights and their dimness and temp. The scenes include manipulating the desired lights and also include turning on the virtual switch so that its tile appears as on and I can use it to toggle the lights off later on.

When I switch between scenes, I am finding that the lights which were on in the previous scene and should be off in the new scene get turned back on. For example, two of my scenes are Normal and Home Theater. Normal is all 6 lights on, bright and cool. HT is only the rear 2 lights on, dim and warm. If Normal is active and then I hit the HT scene button, the front 4 turn off, the rear 2 go dim and warm, but after all that the front 4 then turn back on bright and cool. My guess is that this is a matter of how the scene engine orders the commands within the scene. Specifically, that the command to turn on the virtual switch is after the commands to turn the front four lights off. The virtual switch gets turned on and then the lights mirror it.

The solution would seem to fall on two possibilities. One, altering the sequences of commands in the scene is the obvious one, but I see no way to do this. Two, differentiate between physical and programmatic manipulation of the virtual switch, as you can do in WebCore. But, again, I see no way to do this with ST Scenes. (In fact, I see no way to make such a distinction in ST anywhere, Scenes or Automations.)

Short of recreating all of this in WebCore, any ideas?

Thanks.

I would suggest removing the mirror behavior rule and setup webCoRE to provide the behavior you want with the virtual switch. I think the scenes can stay as they are and provide what you are looking for.

The idea with scene is not to execute a program or sequence of events, but rather to set a group of devices to the desired states (i would expect all the device events to be sent in parallel when a scene is activated).

Thanks @TonyFleisher. Short of recreating WebCore, I don’t see why I couldn’t recreate the scenes’ events in ST Automations – and keep the virtual mirroring, which is a super convenient feature that I really like.

As to scenes not being rooted in a sequence of events, I do not disagree that that is the theoretical understanding. But in reality, not only do the events not occur simultaneously, they occur in the same order every time. Even more strange is that no matter the order I add items to the scene, they end up listed in the same order in the app, every time, no matter how many times I remake the scene. I suppose that there is an ordering that is probably based on some internal identifier on the devices (like a semantically arbitrary primary key column in a database). Even if the engine which executes these events can do so concurrently, it still has to fire them off from an ordered list.