Brightness & Brightness_pct not working in automations

I have a automation that works for turning on a light when motion detected
everything works great until I set brightness or brightness_pct.
When I do that only the 1st light turns on and the others stay off.
Have also tried doing this with scenes and get the same result.
Tried all different ways to list entities with , after each etc but still no go.
If I comment out or remove the brightness statement everything works.
I can set the brightness fine in Lovelace UI for all lights so I know it works.
Wondering if other people are have this issue and its HA or maybe my Sengled bulbs.

- id: '1593273180752'
  alias: Kitchen Motion On
  description: 'Kitchen Motion On '
  trigger:
  - device_id: 224ba4208e06496b94e14dcf3c2803c9
    domain: binary_sensor
    entity_id: binary_sensor.centralite_3326_l_43e42211_ias_zone
    for:
      hours: 0
      minutes: 0
      seconds: 0
    platform: device
    type: motion
  condition: []
  action:
  - data:
      brightness: 200
      entity_id: 
      - light.sengled_e11g13_03092ed4_1
      - light.sengled_e12n14_03099ca9_1
      - light.sengled_e12n14_0309bf86_1
      - light.sengled_e12n14_0309cda5_1
    service: light.turn_on

Try : -

        entity_id: light.sengled_e11g13_03092ed4_1, light.sengled_e12n14_03099ca9_1, light.sengled_e12n14_0309bf86_1, light.sengled_e12n14_0309cda5_1

Why are your entities named so obscurely ?

Tried every way you can list entities and they all work until
I add the brightness.

I added these lights a long time ago just the id ZHA assigned.

Okay, not at a workstation, will send you a copy of one of mine.

You can change entity_id 's and friendly names at any time:

So light.kitchen_counter etc is just easier to code with than a random number

Wondering if it could be that I created this automation in the UI not using yaml
Have another old automation that works fine with brightness but I created it in yaml.

Created this scene and get the same result only the 1st light turns on.

- id: '1593273012443'
  name: Kitchen Motion On
  entities:
    light.sengled_e11g13_03092ed4_1:
      brightness: 200
      friendly_name: Kitchen Island (Center) d4
      off_brightness:
      state: 'on'
      supported_features: 41
    light.sengled_e12n14_03099ca9_1:
      brightness: 200
      friendly_name: Kitchen Island (Out) a9
      off_brightness:
      state: 'on'
      supported_features: 41
    light.sengled_e12n14_0309bf86_1:
      brightness: 200
      friendly_name: Kitchen Island (Window) 86
      off_brightness:
      state: 'on'
      supported_features: 41
    light.sengled_e12n14_0309cda5_1:
      brightness: 200
      friendly_name: Kitchen (Sink) a5
      off_brightness:
      state: 'on'
      supported_features: 41

Remove friendly_name from the states you are setting in your scene. That is not a state you can set.

An alternative that I use is the light group. All my kitchen downlights in one group called kitchen lights can be controlled as one entity, including brightness and other attributes.

Created this scene in the UI the friendly_name was included.
Removed it and still the same issue.

I used to use groups but they were broke and started trying to use scenes because
that was recommended in some posts and seams to let you set brightness for each specific entity.

Well that’s a bug with the scene editor.

Also remove the invalid key off_brightness. That’s not meant to be there either.

Groups, including light group are not broken. I use them extensively.

Removed both to see if that worked and still only turns on the 1st light.
Acts like maybe the entity formatting is wrong and sees the 1st one and then stops.

This is the exact code I have in automations.yaml
If I run this automation only the first light turns on but if
I remove the brightness statement all lights turn on.

- id: '1593273180752'
  alias: Kitchen Motion On
  description: ''
  trigger:
  - device_id: 224ba4208e06496b94e14dcf3c2803c9
    domain: binary_sensor
    entity_id: binary_sensor.centralite_3326_l_43e42211_ias_zone
    for:
      hours: 0
      minutes: 0
      seconds: 0
    platform: device
    type: motion
  condition: []
  action:
  - data:
#      brightness_pct: 100
      entity_id: 
      - light.sengled_e11g13_03092ed4_1
      - light.sengled_e12n14_03099ca9_1
      - light.sengled_e12n14_0309bf86_1
      - light.sengled_e12n14_0309cda5_1
    service: light.turn_on

Replaced the entities section above with

  • scene: scene.kitchen_motion_on
    The scene I created in the UI and get the same result only 1st light comes on.

Try it with the entity list outside the data key:

  action:
    - service: light.turn_on
      entity_id: 
        - light.sengled_e11g13_03092ed4_1
        - light.sengled_e12n14_03099ca9_1
        - light.sengled_e12n14_0309bf86_1
        - light.sengled_e12n14_0309cda5_1
      data:
        brightness: 200

Had to change the formatting a little to not get a config check error
still the same result only 1st light turns on.

  action:
  - service: light.turn_on
    entity_id: 
    - light.sengled_e11g13_03092ed4_1
    - light.sengled_e12n14_03099ca9_1
    - light.sengled_e12n14_0309bf86_1
    - light.sengled_e12n14_0309cda5_1
    data:
      brightness: 200

config check passed that but it looks wrong to me.
Went back and moved the - to where it should be and
config also passed it but same result


  action:
  - service: light.turn_on
    entity_id: 
      - light.sengled_e11g13_03092ed4_1
      - light.sengled_e12n14_03099ca9_1
      - light.sengled_e12n14_0309bf86_1
      - light.sengled_e12n14_0309cda5_1
    data:
      brightness: 200

Then if you are still against using a light group you will have to call the service for each light individually:

action:
  - service: light.turn_on
    entity_id: light.sengled_e11g13_03092ed4_1
    data:
      brightness: 200
  - service: light.turn_on
    entity_id: light.sengled_e12n14_03099ca9_1
    data:
      brightness: 200
  - service: light.turn_on
    entity_id: light.sengled_e12n14_0309bf86_1
    data:
      brightness: 200  
  - service: light.turn_on
    entity_id: light.sengled_e12n14_0309cda5_1
    data:
      brightness: 200

Be careful about copying and pasting my code. The code you show should have been equivalent to mine but I’m posting from an iPad and the cut/paste is doing strange things to the formatting. Might be some strange hidden end of line characters.

If I use your code and just remove the brightness all lights turn on.

When the groups were broken I did manual code all light.turn_on commands
Will go back to that if I have to but this seams like a bug.

Does anyone else have the issue if they have multiple lights with one brightness
do they all turn on or only the 1st one?

Running Hassio on a rapberry pi 3B+
Version 0.111.4

I’m on the same versions and do not have this issue. One of my scenes:

IMG_0585

Apologies for the screenshot. iPad and vscode addon do not play well together either.

All of my lights are Zigbee using ZHA are any of your lights zigbee?
Wondering if it could be a ZHA issue.