Light Scene or Script?

I created some scene’s for my MQTT lights (Ikea Tradfri via Smartthings) and they are not behaving correctly, so I’m wondering if I should use a Script instead? Take the following example:

name: LR Nightlight
entities:
  light.mqtt_living_room_tall_lamp_switch:
    state: on
    brightness: 20
    color_temp: 2203
  light.mqtt_living_room_small_lamp_switch:
    state: on
    brightness: 20
    color_temp: 2203

For some reason, it only works correctly if the lights are off. If they are already on, only the color temperature is changed (brightness is ignored).

I have another scene called LR Read that increases the brightness and color temperature, again this only works correctly when the light is off. If it’s already on, the light starts getting brighter but then it’s like the color temperature change interrupts it and it drops back down to the brightness it was already at and changes temperate only.

Can anyone provide an example of the above scene in a script, maybe with a delay between each change to allow it time to complete? I’m struggling to get anything to work.

Might be an issue with how the Tradfri’s respond. That’s a pretty new component. But the equivalent for a script is like:

lr_nightlight:
  alias: "LR Nightlight"
  sequence:
    - service: light.turn_on
      entity_id: light.mqtt_living_room_tall_lamp_switch
      data:
        brightness: 20
        color_temp: 2203
    - service: light.turn_on
      entity_id: light.mqtt_living_room_small_lamp_switch
      data:
        brightness: 20
        color_temp: 2203

Thanks, yeah I think it must be down to how the smartthings-mqtt-bridge and smart app handles multiple updates for single device at the same time.

So this didn’t seem to work either, I’ve ended up doing it directly through MQTT and adding a delay to allow the lamps time to change brightness then color temp.

lr_normal:
  alias: Living room normal scene
  sequence:
    - service: mqtt.publish
      data:
        topic: "smartthings/Living Room Tall Lamp/switch"
        payload: "on"
    - service: mqtt.publish
      data:
        topic: "smartthings/Living Room Small Lamp/switch"
        payload: "on"
    - delay:
        seconds: 1
    - service: mqtt.publish
      data:
        topic: "smartthings/Living Room Tall Lamp/level"
        payload: "60"
    - service: mqtt.publish
      data:
        topic: "smartthings/Living Room Small Lamp/level"
        payload: "60"
    - delay:
        seconds: 1
    - service: mqtt.publish
      data:
        topic: "smartthings/Living Room Tall Lamp/colorTemperature"
        payload: "2703"
    - service: mqtt.publish
      data:
        topic: "smartthings/Living Room Small Lamp/colorTemperature"
        payload: "2703"

Maybe I don’t need the delay after turning on, i’m gonna have to play around with it.

If the Tradfri’s not working correctly, you might wanna open an issue on Github.