iklein99 / homebridge-smartthings

This is a plugin to Homebridge to connect your Smartthings network into Apple Home Kit.
Apache License 2.0
158 stars 53 forks source link

add Adaptive Lighting #98

Open veonua opened 1 year ago

veonua commented 1 year ago

    // If this bulb supports colorTemperature, then add those handlers
    // if (accessory.context.device.components[0].capabilities.find(c => c.id === 'colorTemperature')) {
    if (this.findCapability('colorTemperature')) {
      this.log.debug(`${this.name} supports colorTemperature`);
      this.service.getCharacteristic(platform.Characteristic.ColorTemperature)
        .onSet(this.setColorTemp.bind(this))
        .onGet(this.getColorTemp.bind(this));
>>>>
      const adaptiveLightingController = new this.platform.AdaptiveLightingController(this.service, {
controllerMode: AdaptiveLightingControllerMode.AUTOMATIC,});
      accessory.configureController(adaptiveLightingController);
<<<<
    }

it's literally 3 lines of code