Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Openmeteo forecast probability of precipitation is not returning an accurate value

Open Beginner friendly
#4,310 2 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
80/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript
Domain
backend

Research direction

The issue identifies openmeteo.js, the dailyParams definition around lines 71–89, and the precipitation probability calculation around line 424. Read those sections first and check how daily values from the Open-Meteo API are mapped into the weather result. Done means the reported probability uses the API's precipitation_probability_max value; run the relevant weather module tests if available.

Written by the indexing model from the issue text.

Description

bug
Environment

MagicMirror² version: 2.38.0
Node version: 24.22.0
npm version: 11.21.0
Platform: docker

Which start option are you using?

node --run start

Are you using PM2?

I don't know

Module

weather

Have you tried disabling other modules?
  • Yes
  • No
Have you searched if someone else has already reported the issue on the forum or in the issues?
  • Yes
What did you do?

The current version of openmeteo.js calculates probability of precipitation using daily hours of precipitation divided by 24 hours to arrive at a percentage.

Line 424: precipitationProbability: weather.precipitation_hours != null ? parseFloat(weather.precipitation_hours * 100 / 24) : null,

This calculation doesn't reflect the actual probability of precipitation.

What did you expect to happen?

I expected openmeteo.js to pull precipitation_probability_max from the openmeteo API and report that as the probability of precipitation.

What actually happened?

The current calculation of probability of precipitation as described above is is used and returns an inaccurate result.

Additional comments

Possible fix (that worked for me) would be to:

  1. Add "precipitation_probability_max" to dailyParams (Lines 71-89)
  2. Modify line 424 to: precipitationProbability: weather.precipitation_probability_max != null ? parseFloat(weather.precipitation_probability_max) : null,

Here's a copy of openmeteo.js that I'm currently using.

openmeteo.js

Participation
  • I am willing to submit a pull request for this change.
Dominant language
JavaScript
Stars
24.1k
Forks
4.6k
Avg merge
5h 36m
Merged PRs (30d)
18

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MagicMirrorOrg/MagicMirror

All issues in MagicMirrorOrg/MagicMirror

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.