GitHunt
PS

psylity/yeelight-dimmer-python

Using this class you can receive, decrypt and handle Yeelight YLKG07YL/YLKG08YL dimmer bluetooth notifications in your python code.

Python Yeelight YLKG07YL/YLKG08YL dimmer handler

About

With this code you can handle dimmer changes in your python code.
Just override YeelightDimmer class and implement your own handlers (check out the demo.py code)

Run the following to find out your dimmer MAC:

# hcitool lescan
LE Scan ...
F8:24:41:C5:A0:BE yee-rc

If you want to use Yeelight dimmers in your ESP32 project - check out this repository

Preparations

To install the required Python dependencies, run the following command:

python3 -m pip install -r requirements.txt

Demo

Retrieving beacon_key

# python3 demo.py F8:24:41:C5:A0:BE
using mac F8:24:41:C5:A0:BE
! Press the "Pair" button at the dimmer...
Connecting... done
Authenticating.. done
beacon_key: a3157ddfac2a30a7f5e33854
starting the demo. triple click to exit, single click to center the knob

[---------------|--------------0------------------------------] -15

Providing beacon_key

# python3 demo.py F8:24:41:C5:A0:BE a3157ddfac2a30a7f5e33854
using mac F8:24:41:C5:A0:BE
starting the demo. triple click to exit, single click to center the knob

[------------------------------0-----------------|------------] 018

Languages

Python100.0%

Contributors

Created December 1, 2021
Updated November 2, 2025
psylity/yeelight-dimmer-python | GitHunt