Skip to content
MCU Atlas
ESP32ESP32

ESPHome firmware for the Xiaomi Mijia Bedside Lamp 2

Custom ESPHome components that give the Xiaomi/Yeelight Bedside Lamp 2 full local Home Assistant control with no Mijia cloud.

Difficulty:IntermediateSource available

Photos

ESPHome firmware for the Xiaomi Mijia Bedside Lamp 2 photo 1
ESPHome firmware for the Xiaomi Mijia Bedside Lamp 2 photo 2
ESPHome firmware for the Xiaomi Mijia Bedside Lamp 2 photo 3
ESPHome firmware for the Xiaomi Mijia Bedside Lamp 2 photo 4

Photos: mmakaay

Key Facts

  • Hardware: Xiaomi Mijia Bedside Lamp 2 (Yeelight)
  • Firmware: ESPHome custom components
  • Integration: Home Assistant, fully local
  • Flashing: open the lamp, serial adapter on the board

About This Project

The Mijia Bedside Lamp 2 is an RGBWW Wi-Fi lamp made by Yeelight for Xiaomi, with a touch panel for power, color and a brightness slider. This project replaces its stock firmware with ESPHome custom components, so every part of the lamp shows up in Home Assistant: the light itself, the touch buttons, the slider and the front-panel LEDs. The lamp stops phoning home to the Mijia cloud, no longer depends on the LAN control option Xiaomi removed, gains a multi-color night light and smooth color transitions. Because the parts are exposed as ESPHome components you can rewire the behavior, for example using the slider as a volume control. Flashing means opening the lamp and connecting a USB-to-serial adapter to the board, which the repo documents step by step with photos.

Source & Attribution

Source: GitHub
Last verified: 10/18/2026
ESPHome firmware for the Xiaomi Mijia Bedside Lamp 2

Available as a complete kit

Yeelight-made RGBWW Wi-Fi bedside lamp with touch controls

Buy from Xiaomi

Related Projects

Watchy: open-source ESP32 e-ink smartwatch
Illustration
ESP32
An open-source smartwatch with a 1.54in e-paper screen and ESP32, hackable watch faces in Arduino.
Beginner·Code
2 parts listed
Low-power ESP32 e-paper weather display (7.5in)
Illustration
ESP32
A wall-mounted 7.5in e-paper weather display on an ESP32 that runs for months on one battery charge.
Intermediate·Code
5 parts listed
OpenEPaperLink: reuse e-ink shelf labels with an ESP32 access point
Illustration
ESP32ESP32-S3
Turns cheap second-hand electronic shelf labels into a Wi-Fi-managed e-ink display fleet via an ESP32 access point.
Advanced·Code
6 parts listed