Read the statement by Michael Teeuw here.
Changing units from 'metric' to 'imperial' breaks currentweather module
-
So glad to know that someone else is experiencing the same thing (well, not actually glad that someone else is having a problem…) All was well until performing the v2.3.1 update, yesterday. The weatherforecast module is fine, but the current weather module is not displaying, and I do have the imperial unit option set.
-
Confirmed that switching to metric restores a display.
-
@dplawrance its fixed on the develop branch
https://github.com/MichMich/MagicMirror/commit/10eb41d31943a4495bf4c4674d52d0b9631a7446
-
Agreed it does appear to fix what was broken. :)
-
Wow I was really starting to lose my mind over this one. Have been going over and over my config.js file.
-
@strawberry-3.141 said in Changing units from ‘metric’ to ‘imperial’ breaks currentweather module:
https://github.com/MichMich/MagicMirror/commit/10eb41d31943a4495bf4c4674d52d0b9631a7446
Having this issue as well, with the same reproduction, changing to metric brings it back but imperial breaks it.
How do I pull the file from the develop branch, as someone fairly new to all this?
-
@sefeing Use the instructions here. You want to
git checkout
the branch by name (in this case, rungit checkout develop
in the~/MagicMirror
folder).You might even be able to use
git cherry-pick 10eb41d31943a4495bf4c4674d52d0b9631a7446
instead, to stay onmaster
but incorporate that specific fix. YMMV. -
@ninjabreadman maybe a silly question, but can I… download and manually replace the file? git cherry-pick failed with the reason:
error: cherry-pick is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm ’
hint: as appropriate to mark resolution and make a commit, or use
hint: ‘git commit -a’.
fatal: cherry-pick failededit… scratch that, it just started working again…
-
Just look at the history of the change that was made in the other branch… it’s in modules/default/currentweather the script you need to update is currentweather.js
I just used an SFTP connection to get into my pi, went to the directory and uploaded the new script. You have to change the following in the script lines 410 and 411. Take note in the case sensitive variable of windChillInF it was changed from windchillinF. You could do it from terminal too using nano or whatever your favorite editor is. That’s what I ended up doing until this gets merged up into the main pull.
var windChillInF = Math.round(35.74+0.6215*tempInF35.75*Math.pow(windInMph,0.16)+0.4275*tempInF*Math.pow(windInMph,0.16)); var windChillInC = (windChillInF - 32) * (5/9);
Obviously after you fix it you’ll have to restart MM or just do a reboot and it should fix itself.
-
Thank you!
That was so simple, and it works! I tried (and failed) to switch over to the the develop branch, learned a lot more about git than I knew, but not enough.