When creating a Virtual On/Off device It is necessary to create an Action Group for each required and desired function. Where the Action calls some external code, the only difference between the different Actions might be the argument(s) to the command to be executed. For example In this case, the only difference between the actions would be the argument to the dcontrol command (Eg. on, off, toggle or status) but 4 Action Groups would be required.
So, for the case noted above and just basic simplicity for the user, I would like to request the Virtual On/Off device configuration dialog allow an option for each of the 4 functions to specify the action in the dialog rather than a pointer to an Action Group. If this were the case, all that would be required for a Virtual on/off switch would be the virtual device itself, and, if needed, a status variable. That would be easier to create and maintain. In fact, if the dialog offered an option to create the variable on-the-fly, the entire virtual device could be created and configured in one dialog.