[Custom Component] EPA UV Index

NOAA and the EPA provides UV Index data for many major US cities. This integration provides this as a sensor. I prefer this over some of the other UV index provides as it does not require creating an account on a 3rd party website. Get it at GitHub - davidn/epa_uvindex: NOAA UV Index integration for home-assistant..

The main state is the daily maximum. If you want to show the hourly UV index in a little histogram, use my accompanying card: GitHub - davidn/uvindex-hourly.

How come this is not placed into a folder like HACS, Sonoff and others? I see this as a possible issue corrupting by copying over the files all ready there.

Just because this is my first published integration and I’m not familiar with the publishing convention. I have changed directory structure and I will look into HACS compatible install.

I’m not saying it needs to go into HACS unless that is the best fix, but that it should be in it’s own folder in the /custom_components/ directory.

I had a problem with the card code, it was missing the “card” call at the top. You might want to change that in your Github instructions. But I have it working now.

I have updated this component to use use the EPA Envirofacts api instead of the NOAA UV Index bulletin. This means this now works for all US cities, and provides an hourly forecast as an attribute as well as the daily maximum.

1 Like

I have also written a card to show a little histogram of the hourly UV index. You can get it from GitHub - davidn/uvindex-hourly

1 Like

@davidn really dumb question: I’m new to Home Assistant. How do I install your Hourly UV Index? I can’t find it in HACS.

I went to the GitHub page but I can’t see the instructions (again I’m very new to this all!)

Thanks in advance!

@chunky_lafunga go to HACS on your home assistant, and from the “…” menu select " Custom repositories" and add “GitHub - davidn/epa_uvindex: EPA UV Index integration for home-assistant.” as type “integration”. If you want to use my custom card, also add “GitHub - davidn/uvindex-hourly: Dashboard Card to show Hourly UV Index provided by EPA UV Index integration” as type “Lovelace”. Then restart home assistant. After that, on Settings > Devices & Services you can click add integration and “EPA UV Index” will appears as a integration option (and on dashboards you can use the custom hourly card.

Just tried to add your integration via HACS & am reporting mixed results.

I was able to add the epa_uvindex following your directions but when I try to add the uvindex-hourly I get the following error:

<Integration davidn/uvindex-hourly> Repository structure for main is not compliant

Is this due to the lack of a “custom_components” folder in your git repo (that’s the only difference I saw), or is there a different process to add the hourly card?

I wasn’t successful reproducing that error with a quick test, but I will investigate further. I will only update here when I have a solution. If you want to see progress along the way I will post to "Repository structure for main is not compliant" error on install · Issue #1 · davidn/uvindex-hourly · GitHub. It likely will be several days before I get the time to look at this though.

Ok, I’ll keep an eye on the Github issue then. Thanks for the heads up & let me know on that issue if you need to provide any further details/info.

The issue is that when adding the custom repo for the lovelace card using HACS, you must select type “Plugin”. I have added install instructions to the repo to make this clearer in future.

1 Like