How To NEVER Touch a Light Switch EVER Again! | Home Assistant + ESPHome Full Example

Опубликовано: 25 Апрель 2026
на канале: Learn Fast Make Things
9,102
191

Combining ESPHome, Home Assistant, motion, time, date, and outdoor illuminance to create a fully automated lighting scene for a room.

If you ever wanted to have one of those magic rooms where the lights automatically adjust to the perfect levels every time you walk in, this is the video where I show how to do just that!

This video includes the following steps to show how to accomplish this task.

1. Using motion sensors and ESPHome to trigger automation in Home Assistant
2. Using Home Assistant automation to turn sets of lights on and off based on day and time
3. Adjusting light brightness based on how bright it is outside in your area using a software-based illuminance sensor
4. Use home assistant Jinja2 Templates for custom logic
5. Use light templates to code custom behavior for your lights.

These combined create a completely hands-free lighting experience for a room, and it's fairly easy once you understand the parts involved.

Software used:
Home Assistant: https://www.home-assistant.io/
ESPHome: https://esphome.io/index.html

Hardware Used:
ESP32: https://geni.us/LB99
Motion sensor: https://geni.us/4ZwJe2u
Breadboard: https://geni.us/AdB0cA
Jumpers: https://geni.us/MkogSjk

Other docs mentioned in this video:
Github repo of all my sample code: https://github.com/askcloudarchitech/...
Home assistant templating: https://www.home-assistant.io/docs/co...
Home assistant light templates: https://www.home-assistant.io/integra...
Software-based illuminance sensor: https://www.home-assistant.io/integra...
ESPHome motion sensor config: https://esphome.io/components/binary_...

00:00 - Automating 4 light sources with Home Assistant and ESPHome
00:14 - All about the lights
00:41 - Controlling lights in 4 different ways
01:24 - Setting up a motion sensor with ESP Home
02:46 - Home Assistant Features used for this automation
03:11 - Setting up the Home Assistant automation
05:17 - The Idea of "Relative Brightness"
06:07 - Home Assistant Light Template Setup
07:21 - Creating a Jinja2 Macro in Home Assistant
09:13 - Home Assistant Helper Entities
09:32 - Timelapse of end result!