async function setValue(broadlinkDevice, gladysDevice, gladysFeature, value) {
  const { type } = gladysFeature;

  const state = {};

  switch (type) {
    case DEVICE_FEATURE_TYPES.LIGHT.BINARY:
      state.pwr = value === 1;
      break;
    case DEVICE_FEATURE_TYPES.LIGHT.COLOR: {
      const [red, blue, green] = intToRgb(value);
      state.red = red;
      state.blue = blue;
      state.green = green;
      break;
    }
    case DEVICE_FEATURE_TYPES.LIGHT.BRIGHTNESS:
      state.brightness = value;
      break;
    case DEVICE_FEATURE_TYPES.LIGHT.TEMPERATURE:
      state.colortemp = value;
      break;
    default:
    // NO-OP
  }

  await broadlinkDevice.setState(state);
}
@description Send value to switch device.
@param {object} broadlinkDevice - Broadlink device.
@param {object} gladysDevice - Gladys device.
@param {object} gladysFeature - Gladys feature.
@param {number} value - Value to send.
@example
await setValue({}, {}, {}, 3);