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.configView on GitHub (pinned to 4b4a59534f)
Solutions
- Replace `useBeaufort: true` with `windUnits: "beaufort"` in the weather module config.
- Remove the obsolete `useBeaufort` key so the check no longer fires.
- 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
- Replace useBeaufort with windUnits: 'beaufort'.
- Keep only one wind-unit mechanism in config to avoid conflicts.
- Run a config validation script on startup.
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
- [weather] Deprecation warning: Your are using the deprecated
- [weather] Deprecation warning: Please consider updating show
- Unknown weather type: ${this.config.type}
- apiKey is required
- Latitude and longitude are required
AI-assisted analysis of MagicMirrorOrg/MagicMirror@4b4a59534f (2026-08-31).
Data as JSON: /api/errors/1e674f10e40708d2.
Report an issue: GitHub.