Smart UV Index Automations in Home Assistant Using Ecowitt WS90

Environmental sensors are one of the most powerful (and often underutilized) parts of a smart home. While most people focus on temperature, humidity, and motion sensors, there is one metric that opens up a surprisingly wide range of automation possibilities: UV index.

Advertisements

In this post, we will explore how you can use the UV index data from an Ecowitt WS90 in Home Assistant to create meaningful, practical, and even fun automations. From protecting your family from excessive sun exposure to improving indoor climate control and optimizing energy usage, UV data can be much more valuable than you might expect.


What You Need

To follow along, you’ll need:

  • Ecowitt WS90 (or similar weather station)
  • Ecowitt gateway (GW2000C or similar)
  • Home Assistant with the Ecowitt integration configured
  • A working UV sensor entity (e.g. sensor.gw2000c_uv_index)

Once everything is set up, Home Assistant will continuously receive UV index readings, typically updated every few seconds or minutes depending on your configuration.


Understanding UV Index

The UV index is a standardized measure of the strength of ultraviolet radiation from the sun. It typically ranges from 0 and upwards:

UV IndexLevelMeaning
0–2LowMinimal risk
3–5ModerateSome protection recommended
6–7HighProtection required
8–10Very HighExtra protection needed
11+ExtremeAvoid sun exposure

Unlike illuminance (lux), which measures visible light, UV index reflects how intense and potentially harmful sunlight is. This makes it particularly useful for health-related automations and predicting solar heat gain in your home.


Why UV Data Is Useful in Home Automation

You might wonder: why not just use temperature or brightness sensors?

The answer is simple:

  • Temperature reacts slowly – by the time indoor temperature rises, it may already be too late to prevent overheating.
  • Lux measures brightness, not intensity – a bright winter day can have low UV, while a slightly hazy summer day can have high UV.

UV index gives you a direct signal of solar strength, making it ideal for predictive automations.


Practical Use Cases

Here are some real-world examples of how you can use UV data in your smart home.

1. Smart Sun Protection Alerts

One of the simplest and most useful automations is notifying your household when UV levels become significant.

For example:

  • Notify when UV > 3 → “Consider sunscreen”
  • Notify when UV > 6 → “High UV – protect yourself”
  • Notify when UV > 8 → “Avoid prolonged sun exposure”

This is especially useful for families with children.


2. Automatic Blinds or Shades Control

UV index can be used to control blinds or motorized shades more intelligently.

Instead of reacting to brightness alone:

  • Lower blinds when UV > 4 and the sun is hitting a specific window direction
  • Raise them again when UV drops

This helps:

  • Reduce overheating
  • Improve indoor comfort
  • Protect furniture from UV damage

3. Smarter Heating and Cooling

UV radiation directly contributes to indoor heating.

You can use UV data to:

  • Reduce heating earlier on sunny days
  • Start cooling before indoor temperature spikes

This improves comfort and can reduce energy consumption (kWh) over time.


4. Plant Care Automation

If you are using plant monitoring in Home Assistant, UV data is extremely valuable.

Examples:

  • Increase watering frequency when UV is consistently high
  • Detect insufficient light when UV remains very low over several days

This gives you a more accurate picture than using indoor light sensors alone.


5. Vehicle Protection

If you have a car parked outside:

  • High UV often means rapid heating inside the vehicle
  • You can trigger preconditioning earlier
  • Or send a warning notification

A Useful Automation Example

Let’s build a practical and useful automation:
UV-based sun protection notification during peak hours

Goal

Send a notification when:

  • UV index becomes high (above 5)
  • It is between 10:00 and 16:00 (peak sun exposure hours)

YAML Automation Example

alias: UV Protection Alert
description: Notify when UV index is high during peak hours
trigger:
- platform: numeric_state
entity_id: sensor.gw2000c_uv_index
above: 5
condition:
- condition: time
after: "10:00:00"
before: "16:00:00"
action:
- service: notify.mobile_app_your_phone
data:
title: "High UV Index"
message: "UV levels are high. Consider sunscreen and sun protection."
mode: single

Making It Smarter

This basic automation works well, but you can improve it further.

Add Hysteresis

Avoid repeated notifications by ensuring it only triggers when crossing the threshold.

Example:

  • Trigger when UV goes above 5
  • Do not trigger again until it drops below 3 first

Add Presence Detection

Only notify when someone is home:

condition:
- condition: state
entity_id: person.your_name
state: "home"

Add Weather Context

Combine UV with temperature for better decisions:

  • UV > 5 AND temperature > 20°C → “High sun exposure”
  • UV > 5 AND temperature < 10°C → “Sun is strong but air is cool”

Creating a UV Status Sensor

Raw numbers are not always intuitive. A great improvement is creating a template sensor that converts UV index into readable categories.

template:
- sensor:
- name: "UV Status"
state: >
{% set uv = states('sensor.gw2000c_uv_index') | float(0) %}
{% if uv < 3 %}
Low
{% elif uv < 6 %}
Moderate
{% elif uv < 8 %}
High
{% elif uv < 11 %}
Very High
{% else %}
Extreme
{% endif %}

This makes dashboards and automations easier to understand.


Dashboard Ideas

Here are a few ideas for visualizing UV data in Home Assistant:

  • Daily UV curve graph
  • Peak UV indicator
  • UV status badge (Low / Moderate / High)
  • Combined weather card (temperature, wind (m/s), UV)

Over time, you will start seeing patterns:

  • Seasonal differences
  • Correlation with indoor temperature
  • Impact on energy consumption

Advanced Ideas

If you want to take things further, here are some more advanced concepts:

UV Exposure Tracking

Track how long UV stays above a certain level during the day.

This could be used to:

  • Estimate sun exposure
  • Create a “sunlight score” for the day

Smart Energy Optimization

Combine:

  • UV index
  • Outdoor temperature (°C)
  • Electricity prices (kWh)

Example:

  • High UV + low electricity price → pre-cool the house
  • High UV + high price → minimize cooling usage

Predictive Climate Control

UV index rises before indoor temperature increases.
This makes it perfect for predictive control:

  • Start ventilation earlier
  • Activate cooling before overheating happens

Final Thoughts

UV index is one of those sensors that is easy to overlook—but once you start using it, it becomes incredibly powerful.

With just a single entity like sensor.gw2000c_uv_index, you can:

  • Improve comfort in your home
  • Protect your family from excessive sun exposure
  • Optimize heating and cooling
  • Enhance plant care
  • Gain deeper environmental insights

The best part is that it integrates seamlessly into Home Assistant and works well with existing automations.

If you already have an Ecowitt WS90, you are sitting on valuable data—now it’s time to put it to use.


Some of the links in this article are "affiliate links", a link with a special tracking code. This means if you click on an affiliate link and purchase the item, we will receive an affiliate commission. The price of the item is the same whether it is an affiliate link or not. Regardless, we only recommend products or services we believe will add value to our readers. By using the affiliate links, you are helping support our Website, and we genuinely appreciate your support.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.