Skip to content

Commit

Permalink
Removed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sahilchaddha committed Dec 10, 2018
1 parent eee060b commit 8054724
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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|

Expand Down
12 changes: 5 additions & 7 deletions src/accessories/lightBulb.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
Expand Down Expand Up @@ -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) => {
Expand Down

0 comments on commit 8054724

Please sign in to comment.