Add new Event CURRENTWEATHER_TYPE

- send it from the weather and currentweather module
- use it in the compliments module directly instead of the data
This commit is contained in:
rejas
2021-01-15 21:44:55 +01:00
parent 1fd506f25d
commit e0d43a4c1e
3 changed files with 25 additions and 43 deletions

View File

@@ -152,6 +152,7 @@ Module.register("weather", {
// What to do when the weather provider has new information available?
updateAvailable: function () {
Log.log("New weather information available.");
this.sendNotification("CURRENTWEATHER_TYPE", { type: this.weatherProvider.currentWeather().weatherType.replace("-", "_") });
this.updateDom(0);
this.scheduleUpdate();
},