mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
Merge pull request #1025 from ryck/feature/indoorHumidity
Feature/indoor humidity
This commit is contained in:
commit
5e51a438a7
@ -19,6 +19,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
- Add test e2e showWeek feature in spanish language.
|
- Add test e2e showWeek feature in spanish language.
|
||||||
- Add warning Log when is used old authentication method in the calendar module.
|
- Add warning Log when is used old authentication method in the calendar module.
|
||||||
- Add test e2e for helloworld module with default config text
|
- Add test e2e for helloworld module with default config text
|
||||||
|
- Add ability for `currentweather` module to display indoor humidity via INDOOR_HUMIDITY notification
|
||||||
|
|
||||||
### Updated
|
### Updated
|
||||||
- Changed 'default.js' - listen on all attached interfaces by default.
|
- Changed 'default.js' - listen on all attached interfaces by default.
|
||||||
|
@ -27,6 +27,7 @@ Module.register("currentweather",{
|
|||||||
showHumidity: false,
|
showHumidity: false,
|
||||||
degreeLabel: false,
|
degreeLabel: false,
|
||||||
showIndoorTemperature: false,
|
showIndoorTemperature: false,
|
||||||
|
showIndoorHumidity: false,
|
||||||
|
|
||||||
initialLoadDelay: 0, // 0 seconds delay
|
initialLoadDelay: 0, // 0 seconds delay
|
||||||
retryDelay: 2500,
|
retryDelay: 2500,
|
||||||
@ -101,6 +102,7 @@ Module.register("currentweather",{
|
|||||||
this.sunriseSunsetIcon = null;
|
this.sunriseSunsetIcon = null;
|
||||||
this.temperature = null;
|
this.temperature = null;
|
||||||
this.indoorTemperature = null;
|
this.indoorTemperature = null;
|
||||||
|
this.indoorHumidity = null;
|
||||||
this.weatherType = null;
|
this.weatherType = null;
|
||||||
|
|
||||||
this.loaded = false;
|
this.loaded = false;
|
||||||
@ -223,6 +225,17 @@ Module.register("currentweather",{
|
|||||||
large.appendChild(indoorTemperatureElem);
|
large.appendChild(indoorTemperatureElem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.config.showIndoorHumidity && this.indoorHumidity) {
|
||||||
|
var indoorHumidityIcon = document.createElement("span");
|
||||||
|
indoorHumidityIcon.className = "fa fa-tint";
|
||||||
|
large.appendChild(indoorHumidityIcon);
|
||||||
|
|
||||||
|
var indoorHumidityElem = document.createElement("span");
|
||||||
|
indoorHumidityElem.className = "bright";
|
||||||
|
indoorHumidityElem.innerHTML = " " + this.indoorHumidity + "%";
|
||||||
|
large.appendChild(indoorHumidityElem);
|
||||||
|
}
|
||||||
|
|
||||||
wrapper.appendChild(large);
|
wrapper.appendChild(large);
|
||||||
return wrapper;
|
return wrapper;
|
||||||
},
|
},
|
||||||
@ -262,6 +275,10 @@ Module.register("currentweather",{
|
|||||||
this.indoorTemperature = this.roundValue(payload);
|
this.indoorTemperature = this.roundValue(payload);
|
||||||
this.updateDom(self.config.animationSpeed);
|
this.updateDom(self.config.animationSpeed);
|
||||||
}
|
}
|
||||||
|
if (notification === "INDOOR_HUMIDITY") {
|
||||||
|
this.indoorHumidity = this.roundValue(payload);
|
||||||
|
this.updateDom(self.config.animationSpeed);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/* updateWeather(compliments)
|
/* updateWeather(compliments)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user