Automatically turn a light on when a door opens and off when it closes — perfect for small closets, cabinets, or 3D printer enclosures.
Import Blueprint
Description
This blueprint links a binary door sensor to a light entity. When the door is opened, the light turns on. When the door is closed, the light turns off.
How It Was Made
I created this blueprint with the help of ChatGPT, which guided me step by step — from writing the YAML code to publishing it on GitHub and formatting this post. It’s a great tool for learning and creating useful automations, even if you’re new to YAML or GitHub.
Requirements
- A binary_sensor with
device_class: door
- A light entity (e.g., smart bulb, LED strip)
Inputs
- Door Sensor – The binary sensor on your closet/cabinet door
- Closet Light – The light to control when the door is opened/closed