DimmerLink — ESPHome Lambda Integration
Integration of DimmerLink AC TRIAC Dimmer with Home Assistant via ESPHome using lambda functions.
Tip
or a simpler approach without lambda code, see the [External Component https://www.rbdimmer.com/docs/dimmerlink-esphome/component.
Contents
Main Sections
- Introduction - Overview, requirements, connection, basic configuration
- Entities - Ready-to-use entities for your configuration
- Examples - Complete working YAML configurations
- Lambda Reference - I2C registers and lambda functions reference
- Troubleshooting - Home Assistant integration, troubleshooting, roadmap
Quick Start
1. Connection
text
ESP32 DimmerLink
───── ──────────
3.3V → VCC
GND → GND
GPIO21 → SDA
GPIO22 → SCL
2. Minimal Configuration
yaml
esphome:
name: dimmerlink
esp32:
board: esp32dev
logger:
api:
ota:
wifi:
ssid: "YOUR_WIFI"
password: "YOUR_PASSWORD"
i2c:
sda: GPIO21
scl: GPIO22
id: bus_a
output:
- platform: template
id: dimmer_out
type: float
write_action:
- lambda: |-
uint8_t level = (uint8_t)(state * 100.0f);
uint8_t data[2] = {0x10, level};
id(bus_a).write(0x50, data, 2, true);
light:
- platform: monochromatic
name: "Dimmer"
output: dimmer_out
gamma_correct: 1.0
3. Flash
bash
esphome run dimmerlink.yaml
30 lines — and the dimmer is in Home Assistant!
Entity Types
| Entity | Platform | Description |
|---|---|---|
| Light | monochromatic |
Main dimmer with brightness |
| Sensor | template |
AC frequency, level, version |
| Binary Sensor | template |
Ready status, error flag |
| Text Sensor | template |
Error code (text) |
| Select | template |
Dimming curve selection |
| Number | template |
Direct level control |
| Button | template |
Reset, Recalibrate |
Configuration Examples
| Example | Description | Link |
|---|---|---|
| Minimal | Light + basic I2C | → |
| Standard | Light + Sensors + Select | → |
| Extended | All entities + diagnostics | → |
| Multi-device | 2+ dimmers on one bus | → |
| With Button | Physical button control | → |
| Production | For production environment | → |
Register Map (Brief)
| Address | Name | R/W | Description |
|---|---|---|---|
0x00 |
STATUS | R | Device status |
0x01 |
COMMAND | W | Control commands |
0x02 |
ERROR | R | Last error code |
0x10 |
DIM0_LEVEL | R/W | Brightness 0-100% |
0x11 |
DIM0_CURVE | R/W | Curve 0-2 |
0x20 |
AC_FREQ | R | AC frequency |
0x30 |
I2C_ADDRESS | R/W | I2C address |
Related Documentation
| Document | Description |
|---|---|
| External Component | ESPHome DimmerLink component (no lambdas) |
| I2C Communication | I2C protocol details |
| Hardware Connection | Connection diagrams |
Version History
| Version | Date | Changes |
|---|---|---|
| 1.0 | 2026-02 | Initial release |