MagicMirrorOrg/MagicMirror · warning

[weather] Deprecation warning: Please consider updating show

Error message

[weather] Deprecation warning: Please consider updating showHumidity to the new style (config string).

What it means

When `showHumidity` is a boolean (legacy style), weather's start() warns and auto-converts it: true becomes the string "wind", false becomes "none". The module self-heals, but the boolean form is deprecated in favor of the new config-string style.

Source

Thrown at defaultmodules/weather/weather.js:109

			else if (locationName) return locationName;
		}

		return this.data.header ? this.data.header : "";
	},

	// Start the weather module.
	start () {
		moment.locale(this.config.lang);

		if (this.config.useKmh) {
			Log.warn("[weather] Deprecation warning: Your are using the deprecated config values 'useKmh'. Please switch to windUnits!");
			this.windUnits = "kmh";
		} else if (this.config.useBeaufort) {
			Log.warn("[weather] Deprecation warning: Your are using the deprecated config values 'useBeaufort'. Please switch to windUnits!");
			this.windUnits = "beaufort";
		}
		if (typeof this.config.showHumidity === "boolean") {
			Log.warn("[weather] Deprecation warning: Please consider updating showHumidity to the new style (config string).");
			this.config.showHumidity = this.config.showHumidity ? "wind" : "none";
		}

		// All providers run server-side: use stable identifier so reconnects don't spawn duplicate HTTPFetchers
		this.instanceId = this.identifier;

		if (window.initWeatherTheme) window.initWeatherTheme(this);

		Log.log(`[weather] Initializing server-side provider with instance ID: ${this.instanceId}`);

		this.sendSocketNotification("INIT_WEATHER", {
			instanceId: this.instanceId,
			weatherProvider: this.config.weatherProvider,
			...this.config
		});

		// Server-driven fetching - no client-side scheduling needed

View on GitHub (pinned to 4b4a59534f)

Solutions

  1. Change `showHumidity: true` to `showHumidity: "wind"`.
  2. Change `showHumidity: false` to `showHumidity: "none"` (or delete it if none is desired default).
  3. Restart MagicMirror and confirm no deprecation warning appears.

Example fix

// before
config: { showHumidity: true }
// after
config: { showHumidity: "wind" }
Defensive patterns

Strategy: validation

Validate before calling

if (typeof weatherConfig.showHumidity === "boolean") {
  throw new Error("showHumidity must be a string: 'wind' | 'none' | ...");
}

Type guard

function isValidShowHumidity(v) {
  return typeof v === "string" && ["wind", "none", "temp", "feelslike", "below"].includes(v);
}

Prevention

When it happens

Trigger: Weather config sets `showHumidity: true` or `showHumidity: false`; the check `typeof this.config.showHumidity === "boolean"` in start() triggers the warning and in-place config rewrite.

Common situations: Upgraded configs from older MagicMirror versions where showHumidity was boolean; tutorials or shared configs predating the string-based option.

Related errors


AI-assisted analysis of MagicMirrorOrg/MagicMirror@4b4a59534f (2026-08-31). Data as JSON: /api/errors/da58bd4e2f05a6ad. Report an issue: GitHub.