docs: @Override
      public void setState(PowerState state) {
          switch(state) {
              case OFF: {
                  if(!isOff()) {
  
                      // apply the new pin state
                      pin.setState(offState);
                  }
                  break;
              }
              case ON: {
                  if(!isOn()) {
  
                      // apply the new pin state
                      pin.setState(onState);
                  }
                  break;
              }
              default: {
                  throw new UnsupportedOperationException("Cannot set power state: " + state.toString());
              }
          }
      }