Using 'Numeric state' for trigger (HUE light brigthness) does Not Work Consistently (SOLVED)

I’m new to Home Assistant but I’m experienced with other Home Automations platforms, like programing HUE bridge outside the App, and integrating with Alexa, Broadlink, Sonoff, etc.

I try to replicate and improve the automation I have with “fake” HUE lights, real light Philips HUE bulbs but unreachable, because moved to another house. I use that “control” lights, commanded with Alexa, to trigger custom rules in HUE bridge.

In HA I can get the state and brightness values of those Unavailable ‘control’ HUE lights.

I have set ‘allow_unreachable: true’ in the Hue: Bridges: section of Configuration.yaml

Also, when CONFIGURE the Hue Bridge I have set “Ignore connectivity status for the given devices” for the ‘control’ HUE lights.

Some HA Automation rules, triggered only by the state (on/off) of the control lights are working properly.


When I define the trigger of the Automation as ‘Numeric state’ brightness of those control lights, it does not consistently work.

The Automation rule sometimes is triggered but other times does not Work. I have rebuilt the Trigger and Action Rules many times, Reloaded the YAML config, and restarted HA (virtual machine on VMware), but They does not work most of the time.

If I define only the ‘Above’ value in the trigger, the action use to work, but sometimes it has triggered the action even if the attribute value changes to a lower value that ‘Above’.

If I define both the ‘Above’ and ‘Below’ values in the trigger, the action is NOT triggered.

I define Mode as Restart.


I understand that for Attribute ‘Brightness’ I should put both values ‘Above’ and ‘Below’ to define the range when the action is triggered, when the value enters that range from outside the range. I.e., the comparisons ‘above’ and ‘’below’ are ANDed and not ORed. Am I Right?

I do not use ‘Value Template (optional)’ for any calculation.

I’m putting in the ‘For (optional)’ either 0:00:00 or 0:00:05 with same results.

Can you confirm if I’m doing right?

What other things should I take into account?

I have solved this problem.

The numeric state of the brightness of the light on the App Phillips HUE and in the HA Web is shown as percentage range (0% - 100%). I was using those values for the trigger numeric state ranges.

But the internal state value of HUE brightness has the range 0 - 255

So, with a simple range conversion, and updating the ‘Above’ and ‘Below’ values of the Numeric State trigger, for the range 0-255, ALL WORKS as expected.