WangDaYeeeeee / GeometricWeather

A Material Design Weather Application
GNU Lesser General Public License v3.0
2.41k stars 188 forks source link

$cpb$ always showing 0% on widget #466

Open Guizp31 opened 1 year ago

Guizp31 commented 1 year ago

Hi, The $cpb$ keyword is always showing 0% in the widget subtitle (with both AccuWeather and Meteo France), instead of the actual data showed in the app. Would be great to fix it ✌️

papjul commented 1 year ago

It's not an error, currently no weather provider supports "Current" precipitation probability. I guess it used to be supported on old weather providers.

See here for AccuWeather: https://github.com/WangDaYeeeeee/GeometricWeather/blob/master/app/src/main/java/wangdaye/com/geometricweather/weather/converters/AccuResultConverter.java#L144-L150 And for MF: https://github.com/WangDaYeeeeee/GeometricWeather/blob/master/app/src/main/java/wangdaye/com/geometricweather/weather/converters/MfResultConverter.java#L196-L202

When the value is NULL, $cpb is replaced with a 0.

To be honest, "current" precipitation probability doesn't make much sense. If it's the current weather, it's always 0% or 100%, either it's raining or it's not.