Skip to content

Commit

Permalink
fix "dc" brightRange adaptation
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanh94 committed Aug 11, 2021
1 parent 056bea1 commit 672b843
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/light_accessory.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ class LightAccessory extends BaseAccessory {
for (var statusMap of this.statusArr) {
switch (statusMap.code) {
case 'bright_value':
if (this.deviceCategorie == 'dj') {
if (this.deviceCategorie == 'dj' || this.deviceCategorie == 'dc') {
defaultBrightRange = { 'min': 25, 'max': 255 }
} else if (this.deviceCategorie == 'xdd' || this.deviceCategorie == 'fwd' || this.deviceCategorie == 'tgq' || this.deviceCategorie == 'dd' || this.deviceCategorie == 'dc' || this.deviceCategorie == 'tgkg') {
} else if (this.deviceCategorie == 'xdd' || this.deviceCategorie == 'fwd' || this.deviceCategorie == 'tgq' || this.deviceCategorie == 'dd' || this.deviceCategorie == 'tgkg') {
defaultBrightRange = { 'min': 10, 'max': 1000 }
}
break;
Expand All @@ -205,20 +205,20 @@ class LightAccessory extends BaseAccessory {
defaultBrightRange = { 'min': 10, 'max': 1000 }
break;
case 'temp_value':
if (this.deviceCategorie == 'dj') {
if (this.deviceCategorie == 'dj' || this.deviceCategorie == 'dc') {
defaultTempRange = { 'min': 0, 'max': 255 }
} else if (this.deviceCategorie == 'xdd' || this.deviceCategorie == 'fwd' || this.deviceCategorie == 'dd' || this.deviceCategorie == 'dc') {
} else if (this.deviceCategorie == 'xdd' || this.deviceCategorie == 'fwd' || this.deviceCategorie == 'dd') {
defaultTempRange = { 'min': 0, 'max': 1000 }
}
break;
case 'temp_value_v2':
defaultTempRange = { 'min': 0, 'max': 1000 }
break;
case 'colour_data':
if (this.deviceCategorie == 'dj') {
if (this.deviceCategorie == 'dj' || this.deviceCategorie == 'dc') {
defaultSaturationRange = { 'min': 0, 'max': 255 }
defaultBrightRange = { 'min': 25, 'max': 255 }
} else if (this.deviceCategorie == 'xdd' || this.deviceCategorie == 'fwd' || this.deviceCategorie == 'dd' || this.deviceCategorie == 'dc') {
} else if (this.deviceCategorie == 'xdd' || this.deviceCategorie == 'fwd' || this.deviceCategorie == 'dd') {
defaultSaturationRange = { 'min': 0, 'max': 1000 }
defaultBrightRange = { 'min': 10, 'max': 1000 }
}
Expand Down

0 comments on commit 672b843

Please sign in to comment.