Help setting up the YLKG07YL, YLKG08YL dimmer switches

Hello! I would like to get some help :sunny:

I’m sorry, could you explain where should I put this?: (When I try to the entities card: I can’t save it. Or this one is goes too in the configuration.yaml?)

alias: ble dimmer automation
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.ble_dimmer_dimmer_yeelight
    attribute: last_packet_id
condition: []
action:
  - choose:
      - conditions:
          - condition: state
            entity_id: sensor.ble_dimmer_dimmer_yeelight
            attribute: last_type_of_press
            state: short press
        sequence:
          - service: light.toggle
            data: {}
            target:
              entity_id: light.yeelink_ceiling5_41d0_light
      - conditions:
          - condition: state
            entity_id: sensor.ble_dimmer_dimmer_yeelight
            attribute: last_type_of_press
            state: rotate right
        sequence:
          - service: light.turn_on
            data:
              brightness_step_pct: >-
                {{ state_attr('sensor.ble_dimmer_dimmer_yeelight',
                'dimmer_value') | int*5 }}
            target:
              entity_id: light.yeelink_ceiling5_41d0_light
      - conditions:
          - condition: state
            entity_id: sensor.ble_dimmer_dimmer_yeelight
            attribute: last_type_of_press
            state: rotate left
        sequence:
          - service: light.turn_on
            data:
              brightness_step_pct: >-
                {{ state_attr('sensor.ble_dimmer_dimmer_yeelight',
                'dimmer_value') | int*-5 }}
            target:
              entity_id: light.yeelink_ceiling5_41d0_light
mode: single

I changed the entity names for my setup.



Go to Settings → automations → “create automation” → “create new automation”, now on the top right, you see the 3 dots, click those → edit in Yaml → paste my code there, hit save.

Now go back to “automations” and you should see a new automation there.
Click on it, and you can either use the visual editor, or the Yaml to edit it.

For adding the ble device, I added it to my configuration.yaml (file editor → /config/configuration.yaml)

How fast does the battery drain for you guys?

Same here. Only RSSI and no sensors. Have you been successful yet?