Read the statement by Michael Teeuw here.
MMM-OpenWeatherMapForecast Doesn't display imperial units
-
@rslohs the doc says the module config options is units
-
@sdetweil I’m not quite sure what you’re saying. The ‘Units:“imperial”,’ is incorrect in the code I shared? What should I try differently?
-
Just a thought: At the top of your config.js file, what are your config
units
set to?Example:
var config = { address: "0.0.0.0", port: 8080, ipWhitelist: [], // Set [] to allow all IP addresses language: "en", timeFormat: 12, units: "imperial",
-
@mykle1 thanks for the suggestion, but that is set to imperial as well.
-
@rslohs its not “Units”, its “units”
this system is case sensitive, every letter matters
-
@sdetweil that’s what I’m using in the config file.
{ module: "MMM-OpenWeatherMapForecast", header: "Schoolcraft, MI Weather", position: "top_right", classes: "default everyone", disabled: false, config: { apikey: "aaaaaaaa", latitude: "aaaaaaa", longitude: "aaaaaa", iconset: "4c", concise: false, forecastLayout: "table", units: "imperial", } },
-
A little late to weigh in but I can verify that imperial setting does not affect the Pop amount. It remains metric. Everything else is imperial.
Sorry.
-
Guess what? I was trying to troubleshoot an issue in this module re: scale and noticed the .js file has changed wind calculations and the following…
units: {
accumulationRain: {
imperial: “mm”,
metric: “mm”,
“”: “mm”
},
accumulationSnow: {
imperial: “mm”,
metric: “mm”,
“”: “mm”
},
windSpeed: {
imperial: “mph”,
metric: “m/s”,
“”: “m/s”
}
},So it looks like imperial might work for you now. I’m not going to test because I need the older .js which I had to modify to get some calculations in kph to work .
Cheers
-
My instance of this module also displays rainfall in “mm”, even though I have set units = “imperial” for the MagicMirror system as a whole and also in the module configuration.
I see that the Open Weather site has a page specifying “API response parameters with available units of measurement” (https://openweathermap.org/weather-data). There one finds a parameter table specifying Parameter and Description - as well as columns for “Standard”, “Metric” and “Imperial”.
The interesting thing is this: the table specifies temperatures correctly (“Kelvin”, “Celsius”, “Fahrenheit”) but for rain it calls out “mm”, “mm”, “mm” - or other variants for different fields, e.g.: “mm/hr” and “mm/hour”.
As such, I am inclined to just give up and accept the module’s behavior as a quirk of how Open Weather parses what it is getting from the NWS - but I thought i would see if anyone has a better idea.
-
@JohnGalt have you tried MMM-OpenWeatherForecast instead? It seems to work better for me adn it uses the OpenWeather Map api too.