Xiaomi Philips Smart LED ceiling automation

Hi,

I’m trying to turn on a specific scene on my Xiaomi Philips ceiling light and failed to success use it in automation.

First, this light is well recognized in my Home assistant with:

    - platform: xiaomi_miio
      name: Xiaomi Philips Smart LED
      host: 192.168.x.x
      token: xxxxxxxxxxxxxxxxxxxxxxxxx

Then if I use a simple command like the following works OK:

      action:
        - service: homeassistant.turn_on   
          entity_id:
          - light.xiaomi_philips_smart_led

But when I want to call a specific scene, then it fails, I’m probably not using the right code but failed to find or figure out the correct one, here is my code:

     action:
       - service: light.turn_on   
         entity_id:
         - light.xiaomi_philips_smart_led
         data:
           set_scene: 4

I get the following error:

[homeassistant.core] Invalid service data for light.turn_on: extra keys not allowed @ data['set_scene']. Got 4

I can set the scene successfully using the following in HA:

miceil --ip 192.168.X.XX --token XXXXXXXXXXXXXXXXXXXXXX set_scene 4

PS: sorry for all the edits, I’m new to this forum :expressionless:

Any clue anyone ? :cry:

I am also trying to make the set_cct and set_bright work. Still testing

it’s an old topic but maybe someone is still looking for an answer. I have a Xiaomi Philips Light but the component is the same i think.

To change scene (example):

    - service: light.xiaomi_miio_set_scene
      data:
        entity_id: light.mylightid
        scene: 4

to change brightness you can use the normal light brightness attribute:

     - service: light.turn_on
       data:
         entity_id: light.mylightid
         brightness: 255
 - service: xiaomi_miio.light_set_scene
   entity_id: light.philips_ceiling
   data:
     scene: 4