Fixed SwitchSensor implementation