You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature Request] Weather module: Offset unit conversion to the Provider when supported #4111
I am running the latest version of MagicMirror², and know that this feature is not available now.
I know my issue is not related to a third-party module.
I have searched for existing issues that already include this feature request, without success.
Describe the Feature Request
Support passing in the unit type into API requests for weather providers when supported. Use the current implementation (the module does the conversions) otherwise.
Describe the Use Case
The current implementation of the weather module always requests metric units in the Provider APIs. This is bad for rounding reasons. Some providers (e.g. WeatherFlow) support providing data with precision (e.g., the tenths place for temperature). When using C (which has a smaller available range), we lose accuracy by as much as 0.2F when manually converting the API response to F.
Note: WeatherFlow does not support providing units in the conditions API where it provides precision; it always returns C. But it supports units in the better_forecast endpoint (however, it always rounds to the nearest whole number for the temperature, which is unfortunate).
A better example of this might be OpenWeatherMap. They provide precise temperatures and support specifying units. Therefore, a C return being converted to F by the module may result in a loss of accuracy due to double-rounding (the API rounds for C, and the module rounds again for F).
Describe Preferred Solution
New public readonly property in provider JS classes. This property defines whether the provider supports specifying units in the API. If this is false, then the weather module does its own conversions (as it currently does). If true, then the module assumes the returned data from the Provider is already converted (and does not convert anything).
When a provider supports unit conversions, use the specified MagicMirror configuration for units if possible. Pass this in the API call for the provider. For special cases, add new Provider-specific configuration properties.
Describe Alternatives
No response
Related Code
No response
Additional Information
No response
Participation
I am willing to submit a pull request for this change.
changed the title [-][Feature Request] Offset unit conversion to the Provider when supported[/-][+][Feature Request] Weather module: Offset unit conversion to the Provider when supported[/+]on Apr 18, 2026
I started working on this in a local branch. However, I came across a potential issue with Weather API that is blocking me. The implementation does not align with their API docs. It uses the forecast API to get the current conditions. But their docs do not indicate that a "current" object is returned in that API. I have to run tests to confirm if that is true. I'll file a separate issue (and fix) if so.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Activity
[-][Feature Request] Offset unit conversion to the Provider when supported[/-][+][Feature Request] Weather module: Offset unit conversion to the Provider when supported[/+]PDStig commentedon Apr 21, 2026
Per #4107 (comment)
I started working on this in a local branch. However, I came across a potential issue with Weather API that is blocking me. The implementation does not align with their API docs. It uses the forecast API to get the current conditions. But their docs do not indicate that a "current" object is returned in that API. I have to run tests to confirm if that is true. I'll file a separate issue (and fix) if so.
sdetweil commentedon Apr 21, 2026
Always start w develop as the base, right?
git checkout develop
Then
git checkout -b new_brsnch_name
PDStig commentedon Apr 21, 2026
Good call. I didn't clone develop for some reason. Thanks! I'll stash the changes, recreate the branch from develop, and pop.
github-actions commentedon Jun 27, 2026
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.