← All recipes

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

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:

Step 2: Create scenes

Create at least two scenes:

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

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