mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
Added Override Notification Option to Weather Module (#3178)
Fixes #3126 Added the option `allowOverrideNotification` to `weather.js`. This allows the module to receive the `CURRENT_WEATHER_OVERRIDE` notification. The expected payload for this notification is a full/partial `weatherObject` that is used to supplement/replace the existing `weatherObject` returned by whichever weather provider is in use. No visual changes. First time contributing - let me know if I've missed something 🙂 --------- Co-authored-by: veeck <michael.veeck@nebenan.de>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* global Class, performWebRequest */
|
||||
/* global Class, performWebRequest, OverrideWrapper */
|
||||
|
||||
/* MagicMirror²
|
||||
* Module: Weather
|
||||
@@ -164,5 +164,9 @@ WeatherProvider.initialize = function (providerIdentifier, delegate) {
|
||||
provider.providerName = pi;
|
||||
}
|
||||
|
||||
if (config.allowOverrideNotification) {
|
||||
return new OverrideWrapper(provider);
|
||||
}
|
||||
|
||||
return provider;
|
||||
};
|
||||
|
Reference in New Issue
Block a user