renamed binarySwitch to switchBinary to match devices type