Here's a series of screen shots leading to a custom action. In this case, the physical device (Enerwave Dual-Relay) is called "Shredder and Fan"
Create a virtual switch:
Create a new rule:
The trigger is Virtual Switch changed:
Create the two conditions to test for (Virtual Switch On & Virtual Switch Off):
Choose "Set Mode or Variables, Run Custom Action", and select "Run Custom Action":
The capability for the action device is Switch, and the switch I selected is "Shredder and Fan":
The Custom Commands that become available are specific to the Enerwave Dual Relay driver and will include the "on1" and "off1" command that was used a couple posts back.
I hope this helps!