Help setting up the YLKG07YL, YLKG08YL dimmer switches

I had this bluetooth rotary dimmer switch knocking around in a drawer.
Just waiting for someone enable support in HA. Now it happened Ernst79 made it work with the HACS custom component Passive BLE Monitor integration.
I have found the bind_key and I am receiving ‘Dimmer value’, ‘Last type of press’ and ‘Rssi’
Normally I would make an automation. But I can not make it work properly.

2 Likes

I received 2 of these today. I will play around with the over the weekend.

I was trying to see if there was a blueprint for an automation, but I couldn’t find one specific for them. I will try to reuse the Phillips HUE or something like that.

I’ll let you know how I go.

2 Likes

Hey,
Anyone have some news about this specific integration?
I am about to buy some of these dimmers, but still waiting for some successful integrations.

@Nick398 did you get it working?

Yes! They work ok, but they have a few downsides.

  • range is not great, it drops with walls and when I connect a USB drive to my raspberry pi
  • when you move the dinner, it reads a 1 step first, and then the actual steps that you moved the dial. This is inconvenient if you want to create an automation to dim a light based on the number of steps.
  • the device will go to sleep after some time so it may not register immediately when you use it again.

How this helps.

1 Like

I really wish that these kinds of devices were able to be used with ESP Home and an ESP32. This makes more sense than trying to get a signal to a home server stuck in a cupboard.

I know that there is a passive Bluetooth feature in ESP Home but it has limited coverage.

I have raised a feature request…

2 Likes

Could anyone make a blueprint for this automation? I’m kinda just starting out and i can’t figure it out how to make an automation for YLKG07YL dimmer to work with my lamp.

2 Likes

Anyone figured out how to use this dimmer switch properly?

I have installed Passive BLE Monitor integration and I can see device, but I can’t use it.

2 Likes

Hi for people who want to use the mi home mod application here the link provid by vevs:
https://mi.vevs.me/mihome/files/public/others/MiHome_6.5.700_63911_vevs_dimmer.apk
After use the mi token extractor:

How to get the bind_key of the dimmer?

I followed the instructions of the Bluetooth custom component here

If anyone still has a problem with the automation of these dimmers, I’m sharing my simple code:
short press - toggle
rotating - brightness 5% for step

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

3 Likes

Thank you! I’m a complete newbie to HA, was trying to use device actions over and over. Your code made it much easier for me to understand what does what and now i was able to automate it properly.

Hello, lpt2007
How did you solve the dimmer problem?
I have the same problem as you have in the picture…

Hi!
I’ve been struggling with the same problem for two days - nothing works)) Didn’t solve the problem?

it turns out that I have bluetooth 4.0, I need at least 4.2. I bought usb bluetooth 5.0 - everything worked.

I have the exact same problem. Did you find any solution?

Hi. Can somebody help me? I see only Signal Strength.

I also can only see RSSI. Did you find any solution?

Anyone succesfull with this one? I do see the device in Passive BLE monitor, including the bind key, but I only see the RSSI.

I ended up putting the ble config in my configuration.yaml.

Here I just put both the binding & token key’s - now it kind of works.

ble_monitor:
  devices:
    - mac: 'F8:24:41:C5:D6:69'
      name: 'dimmer_yeelight'
      encryption_key: 'f0d0b2bc3a8b5c3989b684c2'
      reset_timer: 1
    - mac: 'F8:24:41:C5:D6:69'
      name: 'dimmer_yeelight'
      encryption_key: 'e063ed801e5963fce97748dc'
      reset_timer: 1

The automation I use, is a modified version that’s shared above by dameq1

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.meteor_ambient_light
                - light.meteor_ceiling_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: 15
            target:
              entity_id: light.meteor_ceiling_light
          - service: light.turn_on
            data:
              brightness_step_pct: 15
            target:
              entity_id: light.meteor_ambient_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: -15
            target:
              entity_id: light.meteor_ceiling_light
          - service: light.turn_on
            data:
              brightness_step_pct: -15
            target:
              entity_id: light.meteor_ambient_light
mode: single

Hope it helps!