diff --git a/README.md b/README.md index b82732a..8927ff5 100644 --- a/README.md +++ b/README.md @@ -182,7 +182,7 @@ https://www.mi.com/us/mi-bedside-lamp/ |------------------------------------|---------------------|-------------------------------------------------------|--------| | addResetSwitch | bool | Should add Reset Switch to reset all scenes. | true| | shouldTurnOff | bool | Should turn off lights after scene is over. set false if you want lights to go back to their original state | true| -| pollingInterval | number | Time in ms, for plugin to poll the light to update HomeKit characteristics | 5000| +| pollingInterval | number | Time in ms, for plugin to poll the light to update HomeKit characteristics | 15000| | scenes | Array (Object) | Scenes | Required| | rgb | Object (light ID: true/false) | Key-Value pair for light Ids you wish to use rgb pallete instead of hsv. | Optional| diff --git a/src/accessories/lightBulb.js b/src/accessories/lightBulb.js index ab86419..abb8418 100644 --- a/src/accessories/lightBulb.js +++ b/src/accessories/lightBulb.js @@ -239,11 +239,7 @@ const LightBulb = class extends Accessory { if (this.shouldAddCTChar()) { isCT = true lightbulbService - // TODO: .addCharacteristic(this.homebridge.Characteristic.ColorTemperature) - // .addOptionalCharacteristic(this.homebridge.Characteristic.ColorTemperature) - // lightbulbService - // .getCharacteristic(this.homebridge.Characteristic.ColorTemperature) .on('get', (callback) => { callback(null, this.ct) }) @@ -311,9 +307,11 @@ const LightBulb = class extends Accessory { if (this.shouldAddCTChar()) { isCT = true - // TODO: - // lightbulbService - // .addOptionalCharacteristic(this.homebridge.Characteristic.ColorTemperature) + if (!lightbulbService.getCharacteristic(this.homebridge.Characteristic.ColorTemperature)) { + this.logMessage('***** ERROR: CT CHARACTERISTIC NOT FOUND. Adding New One.. *****') + lightbulbService + .addCharacteristic(this.homebridge.Characteristic.ColorTemperature) + } lightbulbService .getCharacteristic(this.homebridge.Characteristic.ColorTemperature) .on('get', (callback) => {