Change option in Motion activated light from Sunrise/Sunset to a light threshold

As above ive had some excellent help on here from users and just recently helped me with setting a sensor to become active at sunset which works great. Is there a way to change the options from sunset to a light level...ie during the day sometimes it can get quite dark just before a thunderstorm for example so that would be a handier trigger. Ive looked in the options but cant see anything for light level settings...

Thanks

As the old home automation adage goes "If you can't sense it, you can't automate it..."

Where is the light level data coming from? Do you have a luminance sensor, or are you asking how to approximate one using other factors?

Ive got a philips Hue motion sensor....

:red_question_mark:

Please keep in mind that HA has more than 2500 integrations that support tens of thousands of devices and Phillips Hue has sold a variety of motion sensors over the years, so you need to be more specific.

Does your motion sensor have a luminance sensor built in...?

If it doesn't what other sources of data do you have that we could leverage to approximate light level? For example, do you have a weather integration running that supplies condition information?

Many users find the solar elevation (available through the sensor.sun_solar_elevation entity or the elevation attribute of the sun.sun entity) to be a more reliable method than using sunrise and sunset.

Ah - i think i see what you mean....where would i check?

There are also some concerns with integrated Motion+LUX sensors:

  • Placement - does the lux sensor detect the lights it activates.
  • Is the LUX level updated throughout the day or only when motion is detected.
  • Does the LUX level arrive/update at the same time as the motion sensor or is there a slight (millisecond) delay between the arrival/update of the events.

TL;DR a completely separate sensor is easier, but you may be able to work around the issues if you know the exact answers to the above questions.

One of these?

Edit - yes i think it does support light sensing...

Can you recommend a light sensor? happy to get one if that makes the whole thing easier to configure...

Yes i think it does

In my case most days at sunset there is still enough light for about 15-20 minutes.
The thresholds of all my integrated motion+lux sensors are too dark (not useful) - they don't classify it as dark during that period.

Instead my automations start at sunset so lights are on unnecessarily - I just accepted that and moved on.

TL;DR - I tried, but concluded that integrated LUX sensors weren't worth the hassle.


Because I went a different path, I don't have an actual product recommendation.

The only things I can say is that, I would recommend something:

  • With a fairly frequent update - say once per minute or when it changes significantly.
  • That provides a numeric value (i.e. so you can tune it).

Right ok....so better to take it on the chin kinda thing and go one way or the other but, the other (which you an i are currently on [Sunrise and sunset] type operation.

Ironically the other option which i did try was to set up a separate automation to tie all the lights to a wireless button....which i cant get working either.... yey! :slight_smile:

Since you already have one and it does have a numeric Lux value you may as well give it a go and see if you can get it working.

The key points are that:

  • You may need a small delay after the motion triggers to allow HA to receive the Lux update.
  • You probably want separate triggers for on and off since off doesn't need to consider the lux setting (it always turns off when clear).

Yeah - but thats the thing....when im in the automation and i go add in the threshold for light (or whatever setting it is) - i cant see anything that looks like that kind of value/option/function...

So yes it would be nice to try, just not sure where to find the option...

Please describe or post screen shots of what you are talking about. I think you are trying to use the luminance as a condition. To do that, in your automation add a Numeric State condition with the luminance sensor's entity ID in the appropriate field.

To find the entity ID:

Go to the Devices dashboard, find you Hue Motion device, click on it. In the page that open look in the "Sensors" section. Is there an Illuminance sensor? If there is click on it's name to open it's entity popup menu. Click the gear icon to open the entity settings, then find the entity ID field and copy that value.