I’m looking into getting UV Index data into HA. I want to give an alert when the UV index > 3, because that’s the threshold when you start making vitamin D from exposure to sunlight. This can be useful in spring and fall to optimize the time for e.g. a lunch walk to maximize vitamin D generation.
In The Netherlands, where I live, the health authority (RIVM) publishes the measured values for the current day. However, as far as I can see, they only publish this in the form of a graph on the website. (I already load this image in one of my dashboards. But other than that, there’s not much one can do with an image.)
Then there’s OpenUV. That works well for what I want. BUT, OpenUV doesn’t seem to take into account the weather. E.g. today the weather is overcast. OpenUV reports UV index 5.5 for my location, while RIVM values barely reach 1, according to today’s graph. The graph from RIVM suggests that their measurements take into account the weather, while OpenUV does not.
So, I’m looking for a UV-index value that does take into account the weather, ideally based on measurements, like the RIVM one. Does someone know of an alternative source for this data? Or maybe there is an API to access the RIVM data that I didn’t find yet? I’d love to hear from others!
UV can be high even with cloud cover.
Are you asking to know when the UV >3 and it is sunny (no cloud cover).
(high) UV is bad, some sunlight is good so this is a tricky thing to get right. I just googled it online and read the following:
In spring and summer, 25 percent of the body (the hands, face, neck and arms) is exposed to the sun, and in these seasons, about 8 to 10 minutes of sun exposure at noon produces the recommended amount of vitamin D.
In the winter, only 10 percent of the body is exposed, and nearly 2 hours of sun exposure at noon is needed to produce a sufficient amount of vitamin D.
…so perhaps it’s easier to just walk outside for 10 mins?
As far as I know, it’s not only about the amount of skin that is exposed. If the UV-index < 3, there’s almost no vitamin 3 generated. So it does make a difference when you make that 10 minute walk.
That said, I know it’s tricky. And I’ll use my own judgement anyway. But getting a reminder can be useful.
So, with all that said, let’s focus on the technical stuff: is there any API where I can get the actual UV index?
OpenUV seems to only give the theoretical UV index, that would only be accurate on a day when there’s a clear sky.
RIVM gives measured values that do take into account the clouds. But they only seem to expose it via that graph on their website. (They do have an API portal, but the only API they publish is one that exposes historical data on a lot of things, but not UV index.)
Openweather ap also has an uv index, which is 0.99 currently whereas openuv now reports 5.6. So it isn’t the same data. I do not know wht it is based on, nor do I know the scale they use. Values might not be comparable. I also live in NL, and the weather is dreary.