code: function ( switchValue ) {
        log.info( 'Switch "mySwitch"', 'now %j', switchValue );
        if ( switchValue == SWITCH_ON ) {
          ioView.setLED( 'myFirstLED', LED_GREEN );
        } else {
          ioView.setLED( 'myFirstLED', LED_OFF );
        }
      }
docs: possible values