infrastructure to support switch (on/off) commands