The problem is, HA sometimes doesn’t update the lux sensor fast enough and the light doesn’t turn up. What is the best way to wait until lux sensor is updated? At the moment, I have a fixed delay of 100ms, which is too long in most cases, but covers 99% of cases.
Is there a nice way to wait until lux updates or if last update is less than 1s ago, check, else wait for update? Anyone has a better idea?
You could try a trigger node that fires on these 2 conditions only.
Is your illuminance only updated when motion is detected? Then you could also just trigger for this update.