Skip to content

Commit

Permalink
Merge pull request #55 from skrollme/patch-1
Browse files Browse the repository at this point in the history
added missing updates for batteryPercentage and lowBattery
  • Loading branch information
planetk committed Jun 5, 2017
2 parents 0f6a0ed + 4275f1b commit 0522bce
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion accessory/weatherstation-accessory.js
Expand Up @@ -228,6 +228,14 @@ module.exports = function(pHomebridge) {
this.gustAngle = weatherData.gustAngle;
dataChanged = true;
}
if(weatherData.batteryPercent && this.batteryPercent != weatherData.batteryPercent) {
this.batteryPercent = weatherData.batteryPercent;
dataChanged = true;
}
if(weatherData.lowBattery && this.lowBattery != weatherData.lowBattery) {
this.lowBattery = weatherData.lowBattery;
dataChanged = true;
}

if (dataChanged) {
this.getServices().forEach(
Expand Down Expand Up @@ -269,4 +277,4 @@ module.exports = function(pHomebridge) {

}
return WeatherStationAccessory;
};
};

0 comments on commit 0522bce

Please sign in to comment.