jdejaegh / irm-kmi-ha

Home Assistant weather provider using data from Belgian IRM KMI 🇧🇪 🇱🇺 🇳🇱
MIT License
40 stars 0 forks source link

Pollen and Uv-index data as attributes #12

Closed Fe1sar closed 5 months ago

Fe1sar commented 5 months ago

Is it possible to get the KMI data for active pollen and the current Uv-index as seperate attributes? These values are the only ones missing to complete my custom weather card so I would greatly appreciate it if these became available!

jdejaegh commented 5 months ago

Hello!

UV Index is already an attribute (called uv_index). See the screenshot below. image

For the pollen level I have to understand how to get the data: the API does not send a number related to the pollen level, it sends an SVG image that is displayed in the app.

What card do you use exactly? The UV Index is there so it should be shown.

Fe1sar commented 5 months ago

Sorry, didn't notice that one! I'm using a custom:button-card to show these values. I'm currently getting my data from the tomorrow.io integration but these aren't as accurate for Belgium as the ones from KMI. image

jdejaegh commented 5 months ago

I'll look into getting pollen data when I have some time (probably in the coming weeks).

In the meantime, can you share a screenshot showing how the tomorrow.io integration shows the pollen data in its attributes? I'll look at other similar integrations to find a good way of structuring the attributes.

Fe1sar commented 5 months ago

Thanks jdejaegh for following up on this! Below a screenshot of the current tomorrow.io pollen data:

image

I hope this is what you were looking for.

jdejaegh commented 5 months ago

@Fe1sar The feature is included in version 0.2.6.

One sensor per pollen tracked by the KMI API is created in Home Assistant (7 sensors). Each sensor can take any color from the bar shown in the app. If the pollen is simply marked as "active" in the app (with no color bar), then the state is simply "active" in Home Assistant. When the pollen is not reported, the value is "none" for the sensor.

Feel free to share some feedback and open a new issue is something is not working.

Fe1sar commented 5 months ago

Thanks for your update. I've got all the pollen info (and more) I wanted with this! image