migrate OnOffSwitch and ABSwitch to sun