Skip to content

Commit

Permalink
further fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Kroll committed May 28, 2018
1 parent 0049cff commit 101b22c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions accessory/eveatmo-rain-accessory.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ module.exports = function(pHomebridge) {
applyWeatherData(weatherData) {
var dataChanged = false;

if (weatherData.rainLevelSum1 && this.rainLevelSum1 != weatherData.rainLevelSum1) {
if (weatherData.hasOwnProperty("rainLevelSum1") && this.rainLevelSum1 != weatherData.rainLevelSum1) {
this.rainLevelSum1 = weatherData.rainLevelSum1;
dataChanged = true;
}
if (weatherData.rainLevelSum24 && this.rainLevelSum24 != weatherData.rainLevelSum24) {
if (weatherData.hasOwnProperty("rainLevelSum24") && this.rainLevelSum24 != weatherData.rainLevelSum24) {
this.rainLevelSum24 = weatherData.rainLevelSum24;
dataChanged = true;
}
Expand Down
2 changes: 1 addition & 1 deletion accessory/eveatmo-room-accessory.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ module.exports = function(pHomebridge) {
applyWeatherData(weatherData) {
var dataChanged = false;

if (weatherData.currentTemperature && this.currentTemperature != weatherData.currentTemperature) {
if (weatherData.hasOwnProperty("currentTemperature") && this.currentTemperature != weatherData.currentTemperature) {
this.currentTemperature = weatherData.currentTemperature;
dataChanged = true;
}
Expand Down
2 changes: 1 addition & 1 deletion accessory/eveatmo-weather-accessory.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ module.exports = function(pHomebridge) {
applyWeatherData(weatherData) {
var dataChanged = false;

if (weatherData.currentTemperature && this.currentTemperature != weatherData.currentTemperature) {
if (weatherData.hasOwnProperty("currentTemperature") && this.currentTemperature != weatherData.currentTemperature) {
this.currentTemperature = weatherData.currentTemperature;
dataChanged = true;
}
Expand Down

0 comments on commit 101b22c

Please sign in to comment.