Lux Automation Not Working

I’m trying to switch from a living room Aqara FP2 sensor to my outside weather station sensor to monitor light levels and turn lights on when it gets cloudy outside. The automation was working fine when I used my FP2, but it’s not working with the WeatherUnderground sensor from my weather station. Can anyone see why it isn’t triggering?

alias: Living Room Lamp Lux On
description: ""
trigger:
  - platform: numeric_state
    entity_id: sensor.living_room_fp2_light_sensor_light_level
    for:
      hours: 0
      minutes: 1
      seconds: 0
    above: 0
    below: 6
    enabled: false
  - platform: numeric_state
    entity_id: sensor.weatherundergroundsensor_solar_rad_lx
    for:
      hours: 0
      minutes: 0
      seconds: 0
    above: 0
    below: 10000
condition:
  - condition: state
    entity_id: group.family
    state: home
  - condition: time
    before: "22:00:00"
    after: "08:30:00"
    enabled: true
action:
  - type: turn_on
    device_id: 129aa2d1376124ec63d65817e975bc6f
    entity_id: light.living_room_lamp
    domain: light
mode: single

What is the current state of

and is a number or a string?

Shows a number…like 9234.

It needs to go from above 10000 to below 10000 to trigger.

You can “fake” this in dev-tools/states. Set it to 11000, then set it to 9000 and see what happens.

Yup, that’s what I want it to do is below 10000 trigger. It was below 10000 several times and didn’t trigger but today it is. Must have been a fluke with Weather Underground or something else going on but it’s working as expected this morning.

Thank you!

A Numeric State Trigger is designed to trigger when the monitored value crosses the threshold value.

The Numeric State Trigger you created is designed to trigger twice.

  1. When the solar radiation value increases from a value less than 0 to a value greater than 0. That’s what above: 0 does.

  2. When the solar radiation value decreases from a value greater than 10000 to a value less than 10000. That’s what below: 10000 does.

  - platform: numeric_state
    entity_id: sensor.weatherundergroundsensor_solar_rad_lx
    above: 0
    below: 10000

If the solar radiation value is never less than zero then above: 0 isn’t required.

To trigger, it had to change from above 10000 to below 10000. It’s the crossing of the threshold that results in triggering. If the value never rises above 10000 and always remains below 10000, there’s no triggering.