Hey there! If you’ve got Tradfri bulbs with color support (or a bunch of them), you might’ve run into some glitches when trying to animate brightness and color (or color temperature) simultaneously. Well, these bulbs can’t do both at the same time. If you’ve ever tried switching between different scenes with Tradfri, you may know the pain.
This little script is designed to help with that by splitting brightness and color adjustment into separate actions, restoring the ability to use transitions.
How to use this:
- Install the blueprint,
- Instead of calling
light.turn_on
, callscript.tradfri_wrapper
(just replace the script’s name if you want to change it), - Wrap all service call parameters inside a
data
payload like this:
# That's your usual call:
action: light.turn_on
target:
entity_id: light.tradfri_e14
data:
kelvin: 2700
brightness_pct: 100
# Replace with:
action: script.tradfri_wrapper
data:
target:
entity_id: light.tradfri_e14
data:
kelvin: 2700
brightness_pct: 100
If your call involves both brightness and color/temperature adjustment, it’ll be split into two calls, doubling the total transition time but preserving the transition itself.
Direct link: tradfri_wrapper.yaml · GitHub