Hello everyone,
In a variety of automations I check in a trigger or condition what the illuminance value is of my Hue motion sensor outside to determine if it’s dark or not (value below x lux).
I’m now wondering if there is a better/easier way to do this by setting up a ‘Helper’ and use this helper in every automation where I want to know if it’s dark or not.
Any best practices?
Setup a binary sensor template.
You can also use the sunset / sunrise time from the sun integration or the sun angle. I use a combination of sun angle and azimuth to determine if sun is shining in the house. For your use case if sun angle in below zero it’s dusk.
I use outside light level with a threshold helper (which gives you a binary sensor).
The advantage of this is that you can set a hysteresis on either side of the threshold so that the sensor doesn’t flip-flop on and off when it’s just getting light.
I like your approach! Could you maybe share the YAML code you have used to create this helper?
You don’t need yaml - it’s one of the standard helpers defined in the UI.
Thanks everyone for the ideas, I eventually have chosen for the threshold sensor:
I do run into a downside of configure this threshold sensor; my Carport Illumination sensor picked up the bright car lights and then toggled from on to off for several seconds.

is there a way to build in some delay on this?