New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

weatherforecast rainfall rounding issue #1374

vincep5 opened this Issue Aug 7, 2018 · 1 comment


None yet
2 participants
Copy link

vincep5 commented Aug 7, 2018

Please only submit reproducible issues.

If you're not sure if it's a real bug or if it's just you, please open a topic on the forum:
Problems installing or configuring your MagicMirror? Check out:

When submitting a new issue, please supply the following information:

Platform: Place your platform here... give us your web browser/Electron version and your hardware (Raspberry Pi 2/3, Windows, Mac, Linux, System V UNIX).
Raspberry Pi 3B

Node Version: Make sure it's version 0.12.13 or later.

MagicMirror Version: Now that the versions have split, tell us if you are using the PHP version (v1) or the newer JavaScript version (v2).

Description: Provide a detailed description about the issue and include specific details to help us understand the problem. Adding screenshots will help describing the problem.
weatherforecast is rounding rain before it converts it into imperial. So, if the real rainfall is 1.34 the code is turning that into "1" and then performing the calculation to imperial against 1 and not 1.34

Steps to Reproduce: List the step by step process to reproduce the issue.
setup your config to have units: "imperial" in the main config section.
setup your config to have showRainAmount:true in the weatherforecast module.

Expected Results: Describe what you expected to see.
Rainfall amounts should vary day to day.

Actual Results: Describe what you actually saw.
Often many days have the same rainfall amounts.

Configuration: What does the used config.js file look like? Don't forget to remove any sensitive information!
var config = {

units: "imperial",


	module: "weatherforecast",
	position: "top_right",
	header: "Forecast",
	config: {
		updateInterval: 60 * 60 * 1000, // every 60 minutes
		showRainAmount: true,
		roundTemp: true,
		location: "hidden",
		locationID: "hidden",  //ID from
		appid: "hidden"

Additional Notes: Provide any other relevant notes not previously mentioned. This is optional.
Code in weatherforecast.js line 353 : rain: this.roundValue(forecast.rain)
That is rounding the value before it does the calculation to convert into imperial.


This comment has been minimized.

Copy link

MichMich commented Aug 16, 2018

Fix merged: #1376

@MichMich MichMich closed this Aug 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment