Skip to content

Commit

Permalink
Update domoticz_accessory.js
Browse files Browse the repository at this point in the history
Set lux 0 to 0.0001 to comply with HomeKit Lux Spec.
  • Loading branch information
PatchworkBoy committed Oct 17, 2016
1 parent 020dcb7 commit c3a7f32
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/domoticz_accessory.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ eDomoticzAccessory.prototype = {
}
} else if (this.Type == "Lux") { //Lux
value = parseInt(s.Data, 10);
value = (value == 0) ? 0.0001 : value;
} else if (this.subType=="Waterflow" || (this.name.indexOf("Gas") > -1 && this.Type == "General" && this.subType == "kWh")) {
value = Helper.cleanFloat(s.Data);
} else if (this.subType == "RFXMeter Counter" || this.subType == "Percentage" || this.subType == "kWh" || this.subType == "Energy" || this.subType == "Solar Radiation" || this.subType == "UVN800" || this.subType == "Visibility") {
Expand Down

0 comments on commit c3a7f32

Please sign in to comment.