-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Show Snow amounts in new weather module #1545
Comments
After looking at the Dark Sky API, the precipAccumulation is actually snowfall amount. Nowhere in their API do they have a rainfall amount. https://darksky.net/dev/docs#data-point-object |
I remember, that the openweathermap-API (forecast, I did not check it with forecast/daily) provides both, rain and snow, simultaneously, if for instance it snows in the morning and rains in the evening. That would require an additional collumn in the table display. I am not 100 % sure about this, but maybe you should have a look into that! Have a nice day! |
Thanks for the feedback. Yes, correct, it can have both if the weather is like today for me. Rain and snow mix ! forecast and forecast/daily both have rain and/or snow. I have double checked that. I guess what I could also implement, is if the icon is "rain" we show the rain amount and if the icon is "snow" we show the snow amount. I'd have to look at all the different icon names to be sure. |
As you said, it would be much better to flip the icons (weather dependent) as otherwise this may have undesired implications for anyone using custom CSS |
It looks like precipitation type is specified with |
Correct, but there isn't any other field having the rain amount in the Dark Sky API. Dark Sky does more with rain probability % instead of amounts. I'll get a snippet of the JSON later |
Here's a section from the Dark Sky JSON.. |
Pending PR #1573 |
@fewieden @fwitte
We should implement showing Snow in the forecast for the new weather module. I can work on this after the pending new weather PRs are merged.
We should do one of these
1 - have a new config entry for showSnowAmount and show it separate from rain
2 - add both together as one precipitation amount
It looks like the darksky.js provider already takes precipAccumulation and puts the amount in the rain variable. So rain and snow is already considered the same.
Dark Sky API :
"precipAccumulation": 7.337, "precipType": "snow",
darksky.js :
weather.rain = forecast.precipAccumulation;
The OpenWeatherMap API for forecast/daily does have "snow" which is a separate entry than "rain"
We dont do anything with snow today :
"list": [ { "dt": 1547834400, "temp": { "day": 31.05, "min": 25.83, "max": 31.05, "night": 28.62, "eve": 29.21, "morn": 29.19 }, "pressure": 1006.37, "humidity": 86, "weather": [ { "id": 601, "main": "Snow", "description": "snow", "icon": "13d" } ], "speed": 4.61, "deg": 19, "clouds": 44, "snow": 7.79 },
The text was updated successfully, but these errors were encountered: