The pull request message suggested posting here if not sure that it was truly a bug. I figured a second set of eyes to validate that this should be displayed was a good idea so I posted here first.
Issue and pull request have been created.
The pull request message suggested posting here if not sure that it was truly a bug. I figured a second set of eyes to validate that this should be displayed was a good idea so I posted here first.
Issue and pull request have been created.
@sdetweil
I had the issue open, saw it was directing people here for confirmation of bugs and figured I would start here.
I’ve already forked the repo to keep a few other local changes so I should be able to submit a pull request. Just need to refresh myself on how to do that correctly and the project’s submission rules to make sure it is a good request.
OS: Ubuntu 22.04.3 LTS
Node: v21.5.0
MagicMirror Version: 2.26.0
In the hourly weather display, when the the Precipitation Probability is 0 the table cell is blank/empty. For consistency I would expect it to display “0%”
Steps to Reproduce:
I am using the WeatherGov module, but I believe this would be reproducible on any module that uses the weather.js library. To reproduce display the precipitation probability in the hourly weather module and have a dry time period where the precipitation probably is returned as 0%.
Expected Results: To be consistent in the hourly chart, I would expect the table cell to be populated with 0% instead of blank. That gives confidence that data is being returned instead of it being an unknown (i.e. is it zero or is it missing data).
Additional Notes:
I think the problem is with modules\default\weather\weather.js line 238.
If the type is “precip” and the value is 0 or the formated value is “0.00”, then a blank value is returned.
I don’t believe the zero check to be valid for the Precipitation Probability data and instead would send zero values to the WeatherUtils.convertPrecipitationUnit function. There does not appear to be anything in that function that cannot handle a zero value so it should not cause other problems. Null values should continue to return a blank/empty value as they do now.