Copilot c34bdcc86e Implement Homebridge plugin for ESPHome RGBWW lights (#1)
* Initial plan

* Create all plugin files and verify build

Co-authored-by: felixfoertsch <6586185+felixfoertsch@users.noreply.github.com>

* Fix HSV to RGB conversion to use actual brightness and extract magic number

Co-authored-by: felixfoertsch <6586185+felixfoertsch@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: felixfoertsch <6586185+felixfoertsch@users.noreply.github.com>
2026-02-07 20:53:08 +01:00
2026-02-07 17:39:59 +01:00
2026-02-07 17:43:59 +01:00

homebridge-esphome-rgbww

A Homebridge plugin for ESPHome RGBWW lights with native HSV support and automatic RGB ↔ HSV conversion.

Features

  • Full RGB color support via HSV conversion
  • Brightness control
  • Color temperature (warm/cool white)
  • Automatic RGB ↔ HSV conversion
  • Native MQTT support
  • Optimized for Xiaomi Yeelight Bedside Lamp 2 with ESPHome

Installation

npm install -g homebridge-esphome-rgbww

Configuration

Add this to your Homebridge config.json:

{
  "platforms": [
    {
      "platform": "ESPHomeRGBWW",
      "name": "ESPHome RGBWW",
      "lights": [
        {
          "id": "bedside-lamp-4387-1962",
          "name": "Bedside Lamp Rechts",
          "manufacturer": "Yeelight",
          "model": "MJCTD02YL",
          "mqtt_broker": "mqtt://192.168.23.20:1883",
          "state_topic": "bedside-lamp-4387-1962/light/bedside_lamp_rechts/state",
          "command_topic": "bedside-lamp-4387-1962/light/bedside_lamp_rechts/command"
        }
      ]
    }
  ]
}

ESPHome Configuration

Your ESPHome device should publish state to MQTT in this format:

{
  "state": "ON",
  "brightness": 255,
  "color": {
    "r": 255,
    "g": 0,
    "b": 0
  },
  "color_temp": 300,
  "color_mode": "rgb"
}

And accept commands in the same format.

Development

# Clone the repository
git clone https://github.com/felixfoertsch/homebridge-esphome-rgbww.git
cd homebridge-esphome-rgbww

# Install dependencies
npm install

# Build
npm run build

# Link for local development
npm link

# Watch mode
npm run watch

License

MIT

Description
No description provided
Readme MIT 111 KiB
Languages
TypeScript 97.8%
JavaScript 2.2%