Closed cloneofghosts closed 1 year ago
Good catch- I think this might be a HA integration issue actually. Precipitation accumulation is always specified in cm/ inches, so if you're calling the API directly, then the 2.02 is in cm, not mm. Intensity is always in mm/h, which is a weird difference, but that's how Dark Sky did it, so I tied to be consistent.
Are you seeing the accumulation listed in mm in the HA weather entity or a sensor entity?
Ah that would be why the accumulation seems so much lower than on the other sites and I do find it weird that the value is in cm and not mm. It might make sense to have a precipAccumulation
for snow and one for the total liquid accumulation? I remember there was discussion about doing something similar for precipIntensity
but I think it was never implemented.
I'm seeing accumulation listed in mm for the weather entity though I haven't tried the sensor entity but there is this issue about it not working https://github.com/alexander0042/pirate-weather-ha/issues/111
If accumulation is in cm then the API docs need to be updated accordingly since they say it's in mm (that's on me since I thought it was in mm and not cm)
Yea, I'm planning on adding in a liquid one, that way I'd retain compatibility with Dark Sky, but also add in that data. The way the raw API handles it is (as of now), which is, as far as I can tell, identical to how Dark Sky did:
precipAccumulation
: total precipitation in cm
precipIntensity
: precipitation rate in mm/h
So I'll update the docs to clarify that (apologies for not catching it)! The issue here is with the HA integration, since for some reason that has the units wrong. I think they recently changed the accumulation units, so starting there!
I hadn't seen any mention of separating the accumulation into one for liquid and one for snow anywhere so I wasn't sure if it was still planned or not. Maybe creating a GitHub project on this repo might help with things?
It's been on my list since this issue: https://github.com/alexander0042/pirateweather/issues/5#issuecomment-1143748585, but pretty low priority. The good news is that the HA issue is an easy fix, so that will go out this week. Also fixing the docs now, since I should have noticed that before!
I see that you updated the docs so that is fixed. Do you want to keep this open to fix the accumulation in HA or create a HA issue instead?
Going to create a HA issue since the issue is HA related and not an API issue.
I was looking at the precipitation accumulation forecast in my HA install yesterday to see what PW is forecasting for the upcoming rain on Monday and I noticed that it seems to be a lot lower than what other sites are showing. I checked the API this morning and can can confirm that it isn't a HA issue. I went and checked other sites for comparisons and here is what they show:
I wonder if the
precipAccumulation
variable is using the 1:10 liquid ratio for both rain and snow accumulation and multiplying the value in the API by 10 gives you 20.201mm which seems more in line with what other sites are showing.Looking at the hourly forecast seems to confirm my suspicion: