Set the numeric state of an ambient light sensor via automation

When the hall / landing hue motion sensors trigger the lights turn on, and the ambient light sensor in them changes accordingly. The problem I have is when the lights turn off due to there being no motion, the ambient light sensor takes a min or two to update.
Therefore when I go upstairs to use the bathroom the lights come on, but after I’m done the lights are off but they don’t trigger on again as the ambient light sensor still thinks it’s bright.

I therefore want to set the ambient light sensor value to 0 when the light turns off rather than wait for it to update on its own.

Is this possible? If not is there a work around anyone can think of?


I doubt there is a way to force the light sensor to zero. You could trigger solely on the switch state, but then you lights would come on all day.

How about this:
When the lights go off, set an input_boolean to on.
5 minutes later set the input_boolean to off.

Then in your automation, conditions, add an “or” for input_boolean status.

The logic is this:
If the you have just turned the lights out, for the next 5 minutes, ignore the status of the light sensor.
Otherwise, use the light sensor.