![](https://i0.wp.com/thehomesmarthome.com/wp-content/uploads/2021/07/2Capture.png?fit=1064%2C614)
This is how to create a simple smart LED using ESP Home using a small arduino library called fastled
Stuff you will need:
- Individually addressable LED strip (like WS2812)
- A Soldering Iron with some tin
- Usb A male connector with some wires
- ESP8266/ESP32/Arduino board (D1 mini will do the trick)
- Home assistant with ESPHome Add-on
- 20 mins
Connection schema:
![](https://i0.wp.com/thehomesmarthome.com/wp-content/uploads/2021/07/image.png?resize=790%2C551&ssl=1)
- Connect the +5V (Red wire is preferable) from the USB connector to the 5V pin on the D1 mini and to the
+5V pad of the LED - Connect the GND (White wire is preferable) from the USB connector to the GND connector on the D1 mini and to the GND pad of the LED
- Connect the DATA (GREEN wire is preferable) from the LED Din connector to the D4 connector on the D1 mini
- Create a device and have the code below (adjust to your preferences):
![May be an image of text that says 'Home Assistant Overview ESPHome Map Logbook History Editing: Office led. yaml esphone ffice_led platfo SP8266 odemcuv2 Home File editor HACS fallback hotspot (captive portal) Fallback Hotspot" Node-RED case ifi connection fails Portainer logging Zigbee Home Assistant API password: Media Browser password: Shopping list fastled_clockless ame:OFFICE addressables Developer Tools addressable_flicker: Supervisor Configuration Notifications Oshri'](https://scontent.ftlv5-1.fna.fbcdn.net/v/t1.6435-9/122439693_10158079372657968_7097521219235226214_n.jpg?_nc_cat=109&ccb=1-3&_nc_sid=b9115d&_nc_ohc=vN23HKGoIHcAX_fCAdZ&_nc_ht=scontent.ftlv5-1.fna&oh=f4aad6a3b364780b7d0c6fedb8fc0f1f&oe=60F973D7)
esphome:
name: office_led
platform: ESP8266
board: d1_mini
wifi:
ssid: "YOUR-WIFI-SSID"
password: "YOUR-WIFI-PASSWORD"
# Optional manual IP
manual_ip:
static_ip: 192.168.1.24
gateway: 192.168.1.1
subnet: 255.255.255.0
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
light:
- platform: fastled_clockless
chipset: WS2812
pin: D4
num_leds: 20
rgb_order: GRB
name: "OFFICE LED"
id: office_led
effects:
- strobe:
- addressable_rainbow:
- addressable_scan:
- addressable_twinkle:
- addressable_random_twinkle:
- addressable_fireworks:
- addressable_flicker:
The LED in action…