Skip to content

Home Assistant UV Index Card – A professional Lovelace card displaying the real-time UV Index with WHO-based protection recommendations. Uses Mushroom Cards for a clean, modern look.

License

Notifications You must be signed in to change notification settings

filipnet/haos-uv-index

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Home Assistant Compatibility HACS Mushroom Cards

Home Assistant UV Index

Card examples

HAOS UV Index is a professional Lovelace UI card for Home Assistant that displays the real-time UV Index based on data from sensor.outdoor_uv_index. The card provides color-coded risk levels and protection recommendations according to WHO guidelines. It uses Mushroom Cards for a modern and clean design, making it easy to assess UV exposure at a glance.

Why Use This Card?

Monitoring UV radiation is crucial for protecting your skin from harmful sun exposure. This card helps you stay informed about the current UV Index and provides actionable recommendations to minimize risks. Whether you're planning outdoor activities or just want to stay safe, this card is an essential addition to your Home Assistant setup.

Features

  • Displays real-time UV Index from sensor.outdoor_uv_index
  • Color-coded risk level (Green, Yellow, Orange, Red, Purple)
  • Shows WHO protection recommendations
  • Simple and professional Lovelace design

Requirements

  • Home Assistant OS (HAOS)
  • HACS installed
  • Mushroom Cards (via HACS → Frontend → "Mushroom Cards")

Installation

  1. Install Mushroom Cards in HACS
  2. Add the following Lovelace YAML to your Dashboard

Lovelace YAML

type: custom:mushroom-template-card
primary: "UV Index: {{ states('sensor.outdoor_uv_index') }}"
secondary: >
  {% set uv = states('sensor.outdoor_uv_index') | float(0) %}
  {% if uv < 3 %} 🟢 Low - No protection needed
  {% elif uv < 6 %} 🟡 Moderate - Stay in shade, use SPF 30
  {% elif uv < 8 %} 🟠 High - SPF 30+, wear a hat and sunglasses
  {% elif uv < 11 %} 🔴 Very High - SPF 50+, protective clothing
  {% else %} 🟣 Extreme - Avoid sun exposure, SPF 50+
  {% endif %}
icon: mdi:white-balance-sunny
icon_color: >
  {% set uv = states('sensor.outdoor_uv_index') | float(0) %}
  {% if uv < 3 %} green
  {% elif uv < 6 %} yellow
  {% elif uv < 8 %} orange
  {% elif uv < 11 %} red
  {% else %} purple
  {% endif %}
layout: vertical
multiline_secondary: true
fill_container: true

WHO UV Protection Guidelines

The World Health Organization (WHO) has published comprehensive guidelines for protection against UV radiation. These guidelines include measures that vary depending on the UV index, helping to minimize the risks of skin damage and sunburn.

For more information and detailed recommendations, refer to the official WHO guidelines: WHO UV Protection Guidelines

Notification Automation

Optionally, you can enable notifications to receive alerts when the UV Index reaches certain thresholds. An example automation file, automation-notification.yml, is provided in the root of this repository. This automation can be imported into Home Assistant and customized to send notifications (e.g., to your mobile device) when the UV Index becomes high or extreme.

How to use:

  1. Copy automation-notification.yml to your Home Assistant configuration directory.
  2. In Home Assistant, go to Settings → Automations & Scenes → Automations.
  3. Click ⋮ → Import Blueprint and select the automation-notification.yml file.
  4. Adjust the notification targets and thresholds as needed.

Contribution

Contributions to enhance this project are welcome! If you have suggestions, improvements, or bug fixes, please open an issue or submit a pull request.

License

This project is licensed under the terms of the BSD 3-Clause License. See the LICENSE file for more details.

About

Home Assistant UV Index Card – A professional Lovelace card displaying the real-time UV Index with WHO-based protection recommendations. Uses Mushroom Cards for a clean, modern look.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published