Failing to Automate group lights to a particular color using Automation

Hello All,

I have 6 dining lights grouped under light.dining_room. These are Tuya RGBCCT lights.
I have been able to successfully pair them to turn on and off with the click of a button.

Issue is: I want to have them switch on to white color only (if they were previously turned off in any other color). I am using the below and when I remove the commented code for brightness and color I get an error as I guess ‘Automation’ does not support it Any other pointers on how to acheive this?

# FLIC Automation for dining lights
automation:
  - alias: Turn on lights in the living room when flic is pressed once
    trigger:
      platform: event
      event_type: flic_click
      event_data:
        button_name: flic_80e4da77a5aa
        click_type: single
    action:
      service: light.toggle
      entity_id: 
        - light.dining_room
#         brightness: 250
#         rgb_color: [255,0,0]

Automation supports it, but you need to put it in data:, and light.toggle doesn’t support brightness etc. as far as I know.

like this:

action:
  service: light.turn_on
  entity_id: 
    - light.dining_room
  data:
    brightness: 250
    rgb_color: [255,0,0]
1 Like

Awesome! Let me try it.
I had earlier used data but I think my alignment was incorrect and it was always failing the ‘check configuration’ test before I restarted the server.

Edit: Tried and worked perfectly. Many thanks!