Light Group automation step up brightness

I’ve created a light group in my configuration.yaml with two lights.
I’m trying to create an automation for my new Aqara cube to step up brightness on rotate clockwise on the light group.
I’m struggling with the action part

1 Like

Show us your attempt :slight_smile:

This fails with
Message malformed: extra keys not allowed @ data[‘action’][0][‘type’]

alias: Alex Cube Rotate Right
description: ''
trigger:
  - device_id: 999527765cde78c19ca7b258803a061f
    domain: zha
    platform: device
    type: device_rotated
    subtype: right
condition: []
action:
  - type: brightness_increase
    entity_id: light.alex_lights
    domain: light
mode: single

This kind of works but is very erratic
I am trying to continually make the light brighter smoothly as I rotate the cube to the right

alias: LR Lights Brite
description: ''
trigger:
  - device_id: 9168406a092f57b98c41833f0fefb030
    domain: zha
    platform: device
    type: device_rotated
    subtype: right
condition: []
action:
  - service: light.turn_on
    data:
      brightness_step: 10
    target:
      entity_id: light.living_room_lights
mode: single

Try adding a transition to the service call :slight_smile:

Adding a transition was a good tip
Now working as expected

alias: LR Lights Brite
description: ''
trigger:
  - device_id: 9168406a092f57b98c41833f0fefb030
    domain: zha
    platform: device
    type: device_rotated
    subtype: right
condition: []
action:
  - service: light.turn_on
    data:
      transition: 1
      brightness_step_pct: 10
    target:
      entity_id: light.living_room_lights
mode: single

1 Like