Closed Vansmak closed 1 year ago
The precipTypes are sleet, snow, rain and if no precipitation then the value will be none.
@alexander0042 Since this is related I was wondering if Freezing Rain is classified as sleet
or rain
. The DarkSky docs have it classified it as sleet
but since it's rain that freezes when touching the ground shouldn't it be classified as rain
?
GREAT question! I really love these sorts of nitty gritty weather data questions.
Currently, hail, sleet, and freezing rain are all classified as "sleet". This definitely isn't ideal, but it's the best I can do within the Dark Sky framework. I have a longer term plan to add a flag that would let me separate these, since they are different, but for now, sleet is pretty much everything that isn't rain or snow.
Ok, thanks! I know DarkSky classified sleet
as Mixed Precipitation/Sleet/Freezing rain in their docs but I wasn't sure how it worked for PW. As far as I remember it only ever returned Rain or Snow as conditions and it never seemed to use sleet outside of the daily summary.
I don't think I saw anything in their translation module for Hail but I did see something for Thunderstorms so maybe they never set that up before being bought by Apple?
Yes, that's exactly what happened- they reserved it as a possible future response, but it was never implemented in any way. Those two would be the first two to add; however, I want to see what sort of issues this would create for existing Dark Sky libraries. It'll probably be something along the lines of a flag asking for additional parameters, which would let me add them in without breaking compatibility.
I know with WeatherKit that they've implemented Thunderstorms but I don't think they've added anything else in terms of icons/precipTypes. With the current setup freezing rain would fit under rain
but I'm not sure where exactly hail would fit. I was thinking sleet
since they're similar but it might not make sense that way so maybe that's where the flag comes in?
If there was an additional flag it would be for showing additional precipTypes or would it add something else? Maybe once the translations are done it could be used to have an expanded iconset for those that want it? I know that Visual Crossing has a parameter for more icons instead of their default ones.
I also created this issue but it might be better suited for this conversation? I can close it and we can discuss it here or I can leave it separate.
EDIT: I was looking at WeatherKit yesterday and it seems that they've added hail
, mixed
and precipitation
to the precipitationType. Here's a link to the documentation where I found the change: https://developer.apple.com/documentation/weatherkitrestapi/precipitationtype
Not an issue just want to know with this sensor it returns precipitation type and id like to know what all the types are, rain, etc. And what it will return if there is no precipitation. Null, nothing? Thank you very much