astrandb / weatherlink

Weatherlink for Home Assistant
MIT License
10 stars 1 forks source link

Losing the hundredth digit when displaying rainfall. #85

Closed rlknappjr closed 8 months ago

rlknappjr commented 8 months ago

The problem

When we get low amounts of rain like 0.08 inches of rain it does not show up on the information displayed in Home Assistant. When I use the url to access my weatherlink data and see that when the rain recorded was 0.09 inches but home assistant said zero. The data was "rainfall_last_24_hr": 9. that came from the url call. I am a retired programmer but I am not fluent in the languaages to be able to give the solutions This is a picture of the data from the url from weatherlink 20231224_151033 This is the picture of what is showing in home assistant 20231224_151118 You can see the data is present but not getting into home assistant. I would like to see this fixed at some point. I am a beekeeper and watch the rain levels closely and hundreds of an inch is important. Please contact me if you have questions at 515.249.1899.

Version of Weatherlink integration having the issue?

v0.9.6

Version of Home Assistant Core having the issue?

2023.12.2

Anything in the logs that might be useful for us?

No response

Additional information

No response

astrandb commented 8 months ago

The integration just takes the rain values served by the API and feeds them unaltered to HA so all decimals should be there. You can set the display precision by clicking on the entity and select after your preferences. The default display precision is adapted for metric system (0.1 mm). It is not possible to have different defaults for different regions in HA. I had to choose one default. By the way: I don’t recognize the json data on your screenshot. The keys are different from what the API sends to the integration. If you cannot get the proper display precision I will need a diagnostic download file from HA. From the weatherlink device page, open the three-dot-menu, download the file and drag it into this issue.

rlknappjr commented 8 months ago

Watching the rain today on the rain gauge it seems to be getting the hundredth digit because when the weather station readout was 0.19 the display in home assistant was 0.2 so I would like to see the reading being 9.99 rather than 9.9. Thank you for all you hard work. I am so happy to have this data at my fingertips and in a displayable system.

rlknappjr commented 8 months ago

I am relatively new to Home Assistant so am learning a lot of stuff.

rlknappjr commented 8 months ago

Thank you Thank you. I looked at the data graph and it showed that it was getting the more detailed data. I also found that I could request the format I wanted. Thank you very much for your insights. I hope you have a great Christmas and a Happy New Year.

rlknappjr commented 8 months ago

astcandb - Thank you for your help. I really like being associated with a community that is so responsive the users. I will close this line. But I did not expect the quick response I got. Thank you and have a great Christmas and New Year. Ray

rlknappjr commented 8 months ago

thank you