hi, I just brought a Mi Spart Led Bulb and a Mi Smart Led Bulb Essential, started to dig in a little bit and found the a clear guide to set up the device, here the link during the process realize there is a simpler way of doing it.
Step 1. Use the las version of Mi Home and register your bulb. Dont worry if it need to update, feel free of doing it.
Step 2. Get the Ip of the device, you can do this with Nmap or with the app Fing.
Step3. Install in a linux base sistem or for windows 10 the ubuntu subsystem or even Conda works, any system that let you use pip3 and let you do wget, important this system has to be in the same network of the device you want to link.
Step 4. Download this .py code using wget:
Step 5. User the token_extractor.py get the TOKEN of the devices. need to type your user and password from the Mi Home app.
Step 6. Use the fing app and get the IP of the device
Step 7. Run this code in terminal using pip3:
pip3 install python-miio
Step 8. Using the new code run the next line:
miiocli yeelight --ip IP_OF_DEVICE --token TOKEN_OF_DEVICE set_developer_mode 1
This last step should return something like:
Setting developer mode to True ok
Step 9. Go into HA and add the device with yeelight you will need to add the IP to integrate de device.
Good luck hope this work with your light. the modes of my bulb are: XMBGDP01YLK and MJDPL01YL
If there is any problem or error let me know and i will update the tutorial