MagicMirrorOrg/MagicMirror · warning

[weather] Deprecation warning: Your are using the deprecated

Error message

[weather] Deprecation warning: Your are using the deprecated config values 'useBeaufort'. Please switch to windUnits!

What it means

Same deprecation mechanism as useKmh: when the legacy boolean `useBeaufort` is truthy, weather's start() warns and sets windUnits = 'beaufort'. Behavior is preserved but the option will be removed; migrate to `windUnits`.

Source

Thrown at defaultmodules/weather/weather.js:105

		if (this.config.appendLocationNameToHeader) {
			const locationName = this.fetchedLocationName || "";

			if (this.data.header && locationName) return `${this.data.header} ${locationName}`;
			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

View on GitHub (pinned to 4b4a59534f)

Solutions

  1. Replace `useBeaufort: true` with `windUnits: "beaufort"` in the weather module config.
  2. Remove the obsolete `useBeaufort` key so the check no longer fires.
  3. Restart MagicMirror to verify the warning is gone.

Example fix

// before
config: { weatherProvider: "openweathermap", useBeaufort: true }
// after
config: { weatherProvider: "openweathermap", windUnits: "beaufort" }
Defensive patterns

Strategy: validation

Validate before calling

if ("useBeaufort" in weatherConfig) {
  throw new Error("useBeaufort is deprecated: use windUnits: 'beaufort'");
}

Type guard

function usesDeprecatedWindOpts(cfg) {
  return "useKmh" in cfg || "useBeaufort" in cfg;
}

Prevention

When it happens

Trigger: Config.js weather module config contains `useBeaufort: true`; checked via `else if (this.config.useBeaufort)` in start(), only reached when useKmh is falsy.

Common situations: Configs migrated from old modules that displayed Beaufort wind scale; users in UK/IRL-style wind reporting setups copying older example configs.

Related errors


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