Context-Aware Workstation Adaptive Lighting

An intelligent desk lighting automation in Home Assistant that switches between work, night, and cinema scenes based on PC power, user activity, and media playback.

Illustration for: Context-Aware Workstation Adaptive Lighting
AI-generated illustration
WorkingIntermediateFor: maker

About this project

Static motion timers often leave workstations dark while users are typing, reading, or watching media without moving around the room. This project creates a multi-condition adaptive desk lighting system in Home Assistant that monitors active workstation usage rather than simple room occupancy. By combining real-time power draw from an energy-monitoring smart plug with OS-level user input activity reported via webhooks, the system accurately detects when a workstation is occupied. It dynamically transitions between daylight work, evening warm light, cinema dimming, and soldering modes, accounting for TV playback state and physical bench switches. The automation incorporates debounce timers to prevent distracting flickers during brief media pauses or video transitions.

What you need

  • Smart Zigbee RGBCW ceiling lamp or bulb
  • Zigbee energy-monitoring smart plug
  • Smart TV or media player with Home Assistant integration
  • ESP32 board with push buttons
  • Home server running Home Assistant

Highlights

  • Correlates smart plug wattage and OS-level idle timeouts via webhooks to verify active computer use.
  • Automatically adjusts color temperature and brightness between daytime focus (5500K) and nighttime work (3500K).
  • Dims lighting into a cinema scene upon media playback and debounces state changes to avoid flickering during app navigation.

Built with

Home AssistantZigbee