Gaming Room Lighting Based on PC State in Home Assistant
Status: Draft
Last tested: TBD
Works with: Home Assistant, smart lights, PC presence/state sensor
Category: Smart Home / Gaming
Difficulty: Intermediate
Problem
Gaming rooms often have smart lights, but manual scene switching gets old. Home Assistant can change lighting based on whether the gaming PC is active.
What you will build
A simple automation that switches a room to a gaming scene when a PC becomes active, then restores normal lighting when the PC turns off.
Requirements
- Home Assistant
- Smart lights or scenes
- PC state signal such as ping sensor, MQTT, Home Assistant companion app, or smart plug power draw
Quick version
alias: Gaming room scene when PC active
trigger:
- platform: state
entity_id: binary_sensor.gaming_pc_active
to: "on"
action:
- service: scene.turn_on
target:
entity_id: scene.gaming_room_focus
mode: single
Step-by-step setup
Step 1: Create a PC active sensor
Options:
- Ping sensor for basic online/offline
- Smart plug power threshold for actual usage
- MQTT signal from the PC
- Home Assistant companion app sensor
Step 2: Create scenes
Create at least two scenes:
- `scene.gaming_room_focus`
- `scene.gaming_room_normal`
Step 3: Create active automation
Turn on the gaming scene when the PC active sensor turns on.
Step 4: Create restore automation
alias: Restore room lighting when PC inactive
trigger:
- platform: state
entity_id: binary_sensor.gaming_pc_active
to: "off"
for: "00:10:00"
action:
- service: scene.turn_on
target:
entity_id: scene.gaming_room_normal
mode: single
Verification
- PC active sensor changes state correctly.
- Gaming scene activates once.
- Normal scene returns after the cooldown.
Troubleshooting
| Symptom | Likely cause | Fix |
| --- | --- | --- |
| Lights change when PC wakes briefly | Sensor too sensitive | Add `for:` delay or power threshold |
| Scene never activates | Wrong entity ID | Check Developer Tools -> States |
| Scene overrides manual changes | Automation too aggressive | Add time windows or manual override helper |
Optional upgrades
- Detect specific games and choose matching scenes.
- Add bias lighting behind the monitor.
- Disable automation during daytime.
- Add a manual override toggle.