Let’s say I have light.virtual_bulb_1 set up as an emulated Hue bulb. I have turn_on set up to run a script, turn_off set up to run another script… but I’m trying to figure out how to handle brightness up/down.
If light.virtual_bulb_1 brightness increases, I want to execute script.virtual_dimmer_1_up
If light.virtual_bulb_1 brightness decreases, I want to execute script.virtual_dimmer_1_down
You’ll want to create a template sensor that grabs the brightness attribute of that light, then use that template sensor in the trigger of an automation like this:
The condition is there to prevent the automation from firing at home assistant startup in case the light isn’t available right away, or when the light is turned on (which likely means that the template sensor will go from None to a number).
I also don’t totally understand the purpose of what you’re trying to accomplish here but hopefully it gets you there.
Does this all look correct? I got emulated Hue working, but I’m struggling a bit with the dimmer - perhaps because I made some changes, but emulated Hue configuration seems slow to refresh.