I know this is an old topic, but I had been trying to figure this out myself for a long time. This may not be 100% what the original post was looking for (ie virtual switch), but hopefully to helps someone in a similar position who wants to group a set of dimmers.
I had two dimmers which I wished to control together (primarily from one of the dimmers; the other is barely used, if at all). I always wanted the switches paired to operate together, as they both control lights on the outside of my house (one on the garage and one near front door). And I didn’t want to just control these via scenes, in case I needed to brighten the outside of the house to a certain level at night for friends to find the house, etc.
Essentially, set up a startup Lua code similar to the following:
– Set up variable-watch for porch lights #86 to set carriage lights #87
luup.variable_watch(“doChange86”,“urn:upnp-org:serviceId:Dimming1”,“LoadLevelStatus”,86)
function doChange86()
luup.call_action(“urn:micasaverde-com:serviceId:HomeAutomationGateway1”, “RunScene”, {SceneNum = 45}, 0)
end
The above script will monitor for any changes in the dimmer, then run a scene.
So then set up a very basic scene (45 in this case) that changes the level of the lights:
local level86 = luup.variable_get(“urn:upnp-org:serviceId:Dimming1”, “LoadLevelStatus”, 86)
luup.call_action(“urn:upnp-org:serviceId:Dimming1”, “SetLoadLevelTarget”, {newLoadlevelTarget = level86}, 87)
And that’s it. You’d lose any sort of individual control of one of the lights without having to run around and set them in a specific order, but it hopefully will help someone.
I wish I could take credit, but all of this was taken from the following source and used to meet my needs: http://forum.micasaverde.com/index.php/topic,18679.msg217315.html#msg217315