Trigger an automation if the illumination never exceeds a certain amount

Similar noob question here: I have a low light automation that works fine if the illumination goes down (crosses the BELOW threshhold) during the day, but is there a way to trigger an automation if the illumination never exceeds a certain amount? Is that a simple matter of adding an ABOVE value to the automation with the BELOW threshhold?

Depends on what you have, and what you want to do. Share your automation (use code markup) and explain more.

Never is a very long time. In realistic time scales, are you prepared to wait until the end of the hour, day, week, or year?

Please define your trigger needs a bit better.

I am interested in turning on a light between sunrise and sunset on any given day if the illumination does not rise above a certain level. I have working automations that handle the situation that the light level falls below or rises above a certain level, but my question is since there would be no change in light level if it starts out dark and stays that way (say on a rainy day), do I need to check on a time schedule?

You need to work out what the trigger is.

What thing will cause the light to turn on, under what conditions.

Maybe a time trigger (time is 10:00) with a numeric state condition (light below 5 lux), maybe something else.

So I think what you are saying is there must be a trigger, whether occupancy, period of time, light level change–but HA won’t keep checking on its own. Some event or state change has to happen. Which now makes perfect sense as I think about it more.

Trigger it by light level change (no below or above number) and condition below a certain light level.

I had tried that but always get an error message “Message malformed: must contain at least one of below, above”. But it looks like I can set Above to -1 and it will save.

Your trigger needs to look like this

  - platform: state
      - sensor.your_illuminance sensor

You then don’t need an above or below

I was using the device rather than state. Thanks!

No problem glad to help :slight_smile:

1 Like

Correct, that’s how automations work, they all have a trigger that defines when they start processing.