I recently picked up a set of four realistic LED wax candles – they flicker nicely and really look like the real thing. Cost? A whopping € 9,95 for the set of four. The downside: they aren’t smart, and each candle runs on 2 × 1.5 V AA batteries – that’s 8 batteries in total for my set.

A friend got me thinking: why not make them smart? I decided to give my candles a smart upgrade for the Advent season. Here’s a quick run-through of how I did it.
Turning Candles Smart with D1 Mini and ESPHome
To make the candles controllable from your phone, I used a D1 Mini with ESPHome integrated into Home Assistant. This setup lets you:
- Switch each candle individually without touching them
- Avoid handling 8 batteries every time
- Control brightness and even create a sequence – light one candle per Advent, if you like
Each candle gets its own GPIO pin. The D1 Mini handles the logic, while ESPHome exposes each candle as a switch in Home Assistant.
Battery Dummy
Instead of buying a commercial AA battery dummy, you can easily create one yourself at very low cost. I used a hardwood round dowel with the same diameter as an AA cell and cut it to the exact AA length, including the small height difference of the positive terminal. After cutting, I drilled a small pilot hole into each end to host the contacts.
For these contacts, I used drawing pins, soldering enamelled copper wire1 to each pin before inserting them into the pre-drilled holes. The pins sit firmly, provide clean electrical contact, and keep the wiring secure. Once assembled, the wooden dummy fits smoothly into the candle’s battery compartment and offers a reliable external power connection without needing any batteries at all.
For very thin enamelled copper wire, a practical way is to twist it a few times to get a stable bundle, then burn off the insulation with a lighter and tin it afterwards. It takes some practice because the wire is fragile and the enamel does not always melt evenly, but once tinned it is much easier to solder.
Wiring and Voltage Calculation
Each LED candle runs on 2 × 1.5 V AA batteries in series, giving 3 V. The D1 Mini GPIO pins supply 3.3 V, slightly higher than the candle’s rated voltage. To prevent stress on the LEDs, a small series resistor is recommended.

Calculation:
- Voltage difference: 3.3 V − 3.0 V = 0.3 V
- Estimated current per candle: ~8 mA
- Required resistor: R = V / I = 0.3 V / 0.008 A ≈ 37.5 Ω
With tolerance and availability in mind, a 47 Ω ±5% resistor in series with each candle is a clean and safe choice.
Wiring:
- Connect each candle’s positive lead to the resistor.
- Connect the other end of the resistor to a GPIO pin of the D1 Mini.
- Candle ground goes to the D1 Mini ground.
This allows safe switching of each candle while keeping the LEDs happy. With this setup, your candles are fully smart, individually controllable, and battery-safe.
Wemos D1 Mini with Removable Female Headers and PCB Screw Terminal Blocks
For this build I used a Wemos D1 Mini (or compatible clone) and mounted it on my custom PCB without soldering it down permanently. Instead of fixing the microcontroller directly to the board, I used the included single-row female headers. These act as sockets, allowing the D1 Mini to be plugged in, removed, replaced or upgraded at any time. This is especially useful during development, debugging or future hardware changes.
To keep the wiring flexible, I added PCB screw terminal blocks (2-pin). In my setup I soldered a 4-port configuration on one side of the board and an additional 2-port block on the other. These terminals allow me to strip enamelled copper wires, insert them and secure them with screws — no re-soldering necessary, quick to connect and easy to modify.
Additionally, I inserted resistors between the GPIO outputs of the Wemos and the terminal blocks from the top, while soldering them firmly on the underside of the PCB. This ensures proper current limiting while keeping the top side clean and the connections easily accessible.
ESPHome Code for Smart LED Candles
The ESPHome configuration for this project is straightforward. For a detailed explanation of the basic structure, check out my blog post on Smart Aquarium with ESPHome, where the setup, Wi-Fi, and general device configuration are covered.
For the LED candle project, we only need to focus on the switch section, as each candle will be controlled individually via its GPIO pin. Using ESPHome switches makes it easy to turn each candle on or off from Home Assistant or any ESPHome-supported interface.
Here’s the basic approach:
switch:
- platform: gpio
pin: D1 # GPIO5
name: "Candle 1"
id: led_1
restore_mode: RESTORE_DEFAULT_OFF
inverted: false
icon: "mdi:candle"
- platform: gpio
pin: D2 # GPIO4
name: "Candle 2"
id: led_2
restore_mode: RESTORE_DEFAULT_OFF
inverted: false
icon: "mdi:candle"
- platform: gpio
pin: D5 # GPIO14
name: "Candle 3"
id: led_3
restore_mode: RESTORE_DEFAULT_OFF
inverted: false
icon: "mdi:candle"
- platform: gpio
pin: D6 # GPIO12
name: "Candle 4"
id: led_4
restore_mode: RESTORE_DEFAULT_OFF
inverted: false
icon: "mdi:candle"
Each switch corresponds to a candle, allowing you full control over your smart Advent setup. You can integrate these switches into Home Assistant, create automation sequences, or even control the brightness with PWM if desired. This keeps the ESPHome configuration minimal while giving you full individual control of all four candles.

And the best part? You can now enjoy your Advent candles without ever fighting over who has to change the batteries. Santa would definitely approve of this smart, lazy – and slightly nerdy – approach to holiday cheer!
- TRU Components Enamelled copper wire N° 1567045 Outer: 1 x 0,15 mm, 220 m ↩︎