Closet Door Light On Off

Automatically turn a light on when a door opens and off when it closes — perfect for small closets, cabinets, or 3D printer enclosures.



:inbox_tray: Import Blueprint

Import Blueprint


:wrench: 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.


:technologist: 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.


:package: Requirements

  • A binary_sensor with device_class: door
  • A light entity (e.g., smart bulb, LED strip)

:control_knobs: Inputs

  • Door Sensor – The binary sensor on your closet/cabinet door
  • Closet Light – The light to control when the door is opened/closed

I know it’s your first post and all, but maybe ChatGPT should have told you identical Blueprints already exist. These are the first 3 I found in less than a minute: