Successfully Integrating Yeelight Lamps Without LAN Hub: A Step-by-Step Guide

I wanted to share my recent success in integrating my Yeelight bedside lamp into my Home Assistant setup without using the LAN hub protocol. After a firmware update in January, I noticed that the LAN hub option was no longer available in the app, which was frustrating since I wanted to automate my lighting system. However, I stumbled upon a workaround that I’d like to share in case it helps others!

The Journey

  1. Token Extraction: I started by extracting the token from my Xiaomi devices using the Xiaomi Token Extractor. While organizing my devices, I accidentally added my Yeelight lamp to the Xiaomi plug section in my configuration.yaml file. This was a lucky mistake!

  2. Testing and Configuration: After restarting Home Assistant, I noticed that the lamp was being recognized as a switch rather than a light. This meant I could only control it on and off, not adjust brightness or color. I tried several configurations, including different models and platforms, but nothing worked until I realized the lamp was being detected as a plug.

  3. Customization: I added a friendly name and a light icon via customize.yaml to make it more intuitive in the UI. While the color and brightness adjustments aren’t functional yet, the basic on/off functionality is a great start!

Key Takeaways

  • IP and Token: The Yeelight lamp communicates via LAN using its IP address and token, even without the LAN hub enabled. This means there’s potential for more advanced control if the right configuration is found.
  • Switch Configuration: Configuring the lamp as a switch (xiaomi_miio_plug) worked, but it limits functionality. If anyone has success integrating Yeelight lamps as lights without the LAN hub, I’d love to hear about it!

Conclusion

This workaround has been a lifesaver for me, and I hope it can help others facing similar challenges. It’s a reminder that sometimes, a little trial and error can lead to unexpected solutions. If anyone has further insights or tips, please share them below! Let’s continue to explore and optimize our smart home setups together. :rocket: