I have Ikea Trådfri bulbs together with a deconz II stick. Recently, I changed my automation to also set the color temperatures in some rooms. During daytime, I want cooler and brighter light and during evening/night I want warmer and more dim light.
This is triggered first during the day:
- type: turn_on
device_id: e32f6e263b8f689bf451eee3ce56382d
entity_id: light.ikea_e14_4
domain: light
brightness_pct: 50
enabled: true
- action: light.turn_on
metadata: {}
data:
transition: 10
kelvin: 3562
brightness_pct: 50
target:
device_id:
- e32f6e263b8f689bf451eee3ce56382d
This sometimes work, but not always. If I run it explicity with the Run now button, it does indeed work. As you can see, I also have to use the type:turn_on first before setting the temp, otherwise the brightness will not be set. Not sure why.
Similarly, in the evening, this is run:
- type: turn_on
device_id: e32f6e263b8f689bf451eee3ce56382d
entity_id: d9a130617e0cc681b506ff6d3242bdfb
domain: light
brightness_pct: 20
enabled: true
- action: light.turn_on
metadata: {}
data:
kelvin: 2000
brightness_pct: 20
transition: 180
target:
device_id: e32f6e263b8f689bf451eee3ce56382d
Same as before, I have to set the turn on first to set the brightness. Setting the color temp sometimes works but not always.
What am I doing wrong here? I have checked the traces and they do not show anything going wrong as far as I can see.