{"record":{"id":"da58bd4e2f05a6ad","repo":"MagicMirrorOrg/MagicMirror","slug":"weather-deprecation-warning-please-consider-upd","errorCode":null,"errorMessage":"[weather] Deprecation warning: Please consider updating showHumidity to the new style (config string).","messagePattern":"\\[weather\\] Deprecation warning: Please consider updating showHumidity to the new style \\(config string\\)\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"defaultmodules/weather/weather.js","lineNumber":109,"sourceCode":"\t\t\telse if (locationName) return locationName;\n\t\t}\n\n\t\treturn this.data.header ? this.data.header : \"\";\n\t},\n\n\t// Start the weather module.\n\tstart () {\n\t\tmoment.locale(this.config.lang);\n\n\t\tif (this.config.useKmh) {\n\t\t\tLog.warn(\"[weather] Deprecation warning: Your are using the deprecated config values 'useKmh'. Please switch to windUnits!\");\n\t\t\tthis.windUnits = \"kmh\";\n\t\t} else if (this.config.useBeaufort) {\n\t\t\tLog.warn(\"[weather] Deprecation warning: Your are using the deprecated config values 'useBeaufort'. Please switch to windUnits!\");\n\t\t\tthis.windUnits = \"beaufort\";\n\t\t}\n\t\tif (typeof this.config.showHumidity === \"boolean\") {\n\t\t\tLog.warn(\"[weather] Deprecation warning: Please consider updating showHumidity to the new style (config string).\");\n\t\t\tthis.config.showHumidity = this.config.showHumidity ? \"wind\" : \"none\";\n\t\t}\n\n\t\t// All providers run server-side: use stable identifier so reconnects don't spawn duplicate HTTPFetchers\n\t\tthis.instanceId = this.identifier;\n\n\t\tif (window.initWeatherTheme) window.initWeatherTheme(this);\n\n\t\tLog.log(`[weather] Initializing server-side provider with instance ID: ${this.instanceId}`);\n\n\t\tthis.sendSocketNotification(\"INIT_WEATHER\", {\n\t\t\tinstanceId: this.instanceId,\n\t\t\tweatherProvider: this.config.weatherProvider,\n\t\t\t...this.config\n\t\t});\n\n\t\t// Server-driven fetching - no client-side scheduling needed\n","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/MagicMirrorOrg/MagicMirror/blob/4b4a59534f7da01e4030e46029fe9dd649a7675e/defaultmodules/weather/weather.js#L91-L127","documentation":"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.","triggerScenarios":"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.","commonSituations":"Upgraded configs from older MagicMirror versions where showHumidity was boolean; tutorials or shared configs predating the string-based option.","solutions":["Change `showHumidity: true` to `showHumidity: \"wind\"`.","Change `showHumidity: false` to `showHumidity: \"none\"` (or delete it if none is desired default).","Restart MagicMirror and confirm no deprecation warning appears."],"exampleFix":"// before\nconfig: { showHumidity: true }\n// after\nconfig: { showHumidity: \"wind\" }","handlingStrategy":"validation","validationCode":"if (typeof weatherConfig.showHumidity === \"boolean\") {\n  throw new Error(\"showHumidity must be a string: 'wind' | 'none' | ...\");\n}","typeGuard":"function isValidShowHumidity(v) {\n  return typeof v === \"string\" && [\"wind\", \"none\", \"temp\", \"feelslike\", \"below\"].includes(v);\n}","tryCatchPattern":null,"preventionTips":["Always pass showHumidity as a string ('wind' for true, 'none' for false).","Compare your config against current module defaults after upgrades.","Delete boolean-style keys rather than carrying them forward in migrated configs."],"tags":["deprecation","config","weather"],"backgroundTag":"deprecated-config-option","analyzedSha":"4b4a59534f7da01e4030e46029fe9dd649a7675e","analyzedAt":"2026-08-31T21:49:42.591Z","schemaVersion":2},"datasetVersion":"2026-08-31T22:30:34.772Z"}