homeassistant_ecowitt
homeassistant_ecowitt copied to clipboard
Units in precipitation - amount vs slope
Hi,
at first - thanks for the integration, worked flawlessly so far.
There is one thing that irritates me, wanted to discuss this prior to creating a PR.
The GW1100A web interface has these units for rain:
Rain Event 24.4 mm Rain Rate 0.0 mm/Hr Rain Day 23.4 mm Rain Week 24.7 mm Rain Month 35.6 mm Rain Year 35.6 mm
In the integration, time is added everywhere. IMHO, this makes no sense.
Let's start with the "Rain Event" - this is how much rain we had during the current/last rain event, no matter how long it was. Therefore, you can't say 24.4mm/hr - it may have been 24.4mm in half a day or only one hour.
"Rain Rate" needs the /h, as it is the slope at the current moment.
The other figures (Day, Week, Month, Year) are the amount, not the slope. Like you pay for kWh in your yearly engery bill, not kWh/year. Consumed energy vs. average power draw.
The counters reset at the start of the timespan, so if you are 3h into the day, and it rained 3mm so far, it says '3mm/day' - what is technically wrong, it must be '3mm/3h' , or '24mm/d' so that you get the correct amount when caluclating "rain day * day" to get the amount of water on the soil.
Another example, if you have a look at https://www.currentresults.com/Weather/Germany/average-yearly-precipitation.php, the normal unit for annual precipitation is Inches / Millimetres.
Regards Moritz
Thanks for explaining this! It'd be great if we can get a fix in asap, even if this is only a display issue
Agreed, I used customize: to change the units for my entities from mm/h etc. but it causes a warning in the logs.
Just an update on above:
You can fix the warning in the logs by going to https://my.home-assistant.io/redirect/developer_statistics and pressing 'fix issue', it will allow you to change historical units to match.
my customize.yaml file includes (as I break my yaml in to separate file using !include):
unit_of_measurement: mm
sensor.event_rain_rate:
unit_of_measurement: mm
and so on