game-light-tracker

Track live NFL, NBA, NHL, or MLB games and automatically change Hue light colors based on which team is leading. Use when user wants to sync smart lights with live sports scores for visual game tracking. Supports NFL, NBA, NHL, and MLB games with customizable team colors.

3,891 stars
Complexity: medium

About this skill

This AI agent skill, 'Game Light Tracker,' enables a dynamic and immersive sports viewing experience by connecting live game scores to your Philips Hue smart lights. It continuously fetches real-time scores from the ESPN API for NFL, NBA, NHL, or MLB games. Upon detecting a lead change, the skill automatically updates the color of your specified Hue light to match the customizable color assigned to the leading team. The primary use case for this skill is to enhance the atmosphere of live sports viewing, whether for personal enjoyment or during a gathering. It provides an immediate, visual cue for significant game events like lead changes, allowing users to stay engaged with the game without constantly checking a screen. An optional third color can also be set for tied games, adding further visual detail. Users would leverage this skill to make their game-watching more interactive and exciting. It's particularly useful for creating an engaging environment during critical moments in a game, offering a unique way to track the ebb and flow of a match through ambient lighting. The setup requires Home Assistant with Hue lights configured and an API token for seamless integration.

Best use case

The primary use case is to immerse sports fans in live NFL, NBA, NHL, or MLB games by syncing their smart lights with real-time scores. It benefits users who want a dynamic, visual representation of game progress and lead changes without constantly looking at a screen, enhancing the atmosphere for game nights or casual viewing.

Track live NFL, NBA, NHL, or MLB games and automatically change Hue light colors based on which team is leading. Use when user wants to sync smart lights with live sports scores for visual game tracking. Supports NFL, NBA, NHL, and MLB games with customizable team colors.

The specified Hue smart lights will automatically change color in real-time to match the leading team's chosen color during a live NFL, NBA, NHL, or MLB game.

Practical example

Example input

Track the Rams vs Seahawks game and change my backlight to blue when Rams lead, green when Seahawks lead

Example output

Successfully started monitoring the Rams vs Seahawks game. Your backlight will now update to blue for Rams lead or green for Seahawks lead. Initial status: Rams leading 7-0.

When to use this skill

  • When watching live NFL, NBA, NHL, or MLB games.
  • For hosting sports viewing parties and wanting an interactive ambiance.
  • If you desire a subtle, dynamic visual indicator of game scores and lead changes.
  • To enhance the immersive experience during a sports broadcast.

When not to use this skill

  • If you don't have Philips Hue smart lights or Home Assistant configured.
  • For tracking past games, non-live scores, or sports leagues not listed.
  • If you prefer static or manually controlled lighting during games.
  • When an internet connection or ESPN API access is unavailable.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/game-light-tracker/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/0xadamsu/game-light-tracker/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/game-light-tracker/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How game-light-tracker Compares

Feature / Agentgame-light-trackerStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexitymediumN/A

Frequently Asked Questions

What does this skill do?

Track live NFL, NBA, NHL, or MLB games and automatically change Hue light colors based on which team is leading. Use when user wants to sync smart lights with live sports scores for visual game tracking. Supports NFL, NBA, NHL, and MLB games with customizable team colors.

How difficult is it to install?

The installation complexity is rated as medium. You can find the installation instructions above.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Game Light Tracker

Automatically sync your Hue lights with live sports scores. When the lead changes, your lights change color to match the leading team.

## Quick Start

**Basic usage:**
```
Track the [Team A] vs [Team B] game and change my [light name] to [color1] when [Team A] leads and [color2] when [Team B] leads
```

**Examples:**
- "Track the Rams vs Seahawks game and change my backlight to blue when Rams lead, green when Seahawks lead" (NFL)
- "Monitor the Lakers vs Celtics game, purple for Lakers, green for Celtics" (NBA)
- "Watch the Rangers vs Devils game - blue for Rangers, red for Devils" (NHL)
- "Track the Yankees vs Red Sox game, make my living room light blue for Yankees, red for Red Sox" (MLB)

## How It Works

1. Fetches live scores from ESPN API every 20 seconds
2. Detects lead changes
3. Changes specified Hue light color via Home Assistant
4. Includes auto-restart keeper to prevent timeouts
5. Optional: Adds third color for tied games

## Setup Requirements

- Home Assistant with Hue lights configured
- Home Assistant API token (stored in `.homeassistant-config.json`)
- Light entity ID from Home Assistant

## Scripts

### `game-tracker.ps1`
Main monitoring script that tracks a specific game and updates lights.

**Usage:**
```powershell
.\game-tracker.ps1 -Sport "nfl" -Team1 "LAR" -Team2 "SEA" -Light "light.backlight" -Color1 "0,0,255" -Color2 "0,100,0" [-TiedColor "255,0,0"]
```

**Parameters:**
- `-Sport`: "nfl", "nba", "nhl", or "mlb"
- `-Team1`: First team abbreviation
- `-Team2`: Second team abbreviation
- `-Light`: Home Assistant light entity ID
- `-Color1`: RGB color for Team1 (comma-separated, e.g., "0,0,255" for blue)
- `-Color2`: RGB color for Team2 (comma-separated, e.g., "0,100,0" for dark green)
- `-TiedColor`: (Optional) RGB color when game is tied

### `keeper.ps1`
Auto-restart supervisor that prevents 30-minute timeout crashes.

**Usage:**
```powershell
.\keeper.ps1 -TrackerScript "game-tracker.ps1" -RestartInterval 25
```

**Parameters:**
- `-TrackerScript`: Path to the game-tracker.ps1 script
- `-RestartInterval`: Minutes between restarts (default: 25)

## Common Team Abbreviations

**NFL:**
- Rams: LAR, Seahawks: SEA, Chiefs: KC, Bills: BUF, Patriots: NE
- Cowboys: DAL, Eagles: PHI, 49ers: SF, Packers: GB, Bears: CHI
- [Full list: https://www.espn.com/nfl/teams]

**NBA:**
- Lakers: LAL, Celtics: BOS, Warriors: GS, Knicks: NY, Bulls: CHI
- Heat: MIA, Nets: BKN, 76ers: PHI, Bucks: MIL, Mavericks: DAL
- Nuggets: DEN, Suns: PHX, Clippers: LAC, Raptors: TOR
- [Full list: https://www.espn.com/nba/teams]

**NHL:**
- Rangers: NYR, Devils: NJ, Bruins: BOS, Maple Leafs: TOR, Canadiens: MTL
- Penguins: PIT, Capitals: WSH, Flyers: PHI, Lightning: TB, Panthers: FLA
- Red Wings: DET, Blackhawks: CHI, Avalanche: COL, Golden Knights: VGK
- [Full list: https://www.espn.com/nhl/teams]

**MLB:**
- Yankees: NYY, Red Sox: BOS, Dodgers: LAD, Giants: SF, Mets: NYM
- Cubs: CHC, Cardinals: STL, Astros: HOU, Braves: ATL, Phillies: PHI
- [Full list: https://www.espn.com/mlb/teams]

## Common RGB Colors

- **Blue**: 0,0,255
- **Red**: 255,0,0
- **Green**: 0,255,0
- **Dark Green**: 0,100,0
- **Orange**: 255,165,0
- **Purple**: 128,0,128
- **Yellow**: 255,255,0
- **White**: 255,255,255

## Workflow

When user requests game tracking:

1. **Identify sport and teams:**
   - Extract sport (NFL/NBA/NHL/MLB)
   - Get team abbreviations from user or look up from team names

2. **Get light and color preferences:**
   - Ask for light entity ID (or read from Home Assistant config)
   - Get desired RGB colors for each team
   - Optional: Ask if they want a tied-game color

3. **Load Home Assistant config:**
   ```powershell
   $config = Get-Content ".homeassistant-config.json" | ConvertFrom-Json
   $token = $config.token
   $url = $config.url
   ```

4. **Start game tracker:**
   ```powershell
   .\scripts\game-tracker.ps1 -Sport "nfl" -Team1 "LAR" -Team2 "SEA" -Light "light.backlight" -Color1 "0,0,255" -Color2 "0,100,0" -TiedColor "255,0,0"
   ```

5. **Start keeper for auto-restart:**
   ```powershell
   Start-Process powershell -ArgumentList "-File keeper.ps1 -TrackerScript 'game-tracker.ps1'" -WindowStyle Hidden
   ```

6. **Confirm to user:**
   - Tell them monitoring is active
   - Show current score if available
   - Explain color scheme
   - Tell them how to stop it

## Stopping the Tracker

To stop monitoring:
```powershell
Get-Process powershell | Where-Object { $_.CommandLine -like "*game-tracker.ps1*" -or $_.CommandLine -like "*keeper.ps1*" } | Stop-Process -Force
```

## Troubleshooting

**Light not changing:**
- Verify Home Assistant token is valid
- Check light entity ID is correct
- Ensure Home Assistant is accessible at the configured URL

**Script crashes:**
- Keeper should auto-restart it
- Check ESPN API is accessible
- Verify team abbreviations are correct

**Wrong team colors:**
- Double-check RGB values (must be 0-255, comma-separated)
- Ensure colors are assigned to correct teams

Related Skills

Budget & Expense Tracker — AI Agent Financial Command Center

3891
from openclaw/skills

Track every dollar, enforce budgets, spot spending patterns, and build wealth — all through natural conversation with your AI agent.

General Utilities

find-skills

3891
from openclaw/skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

General Utilities

filesystem

3891
from openclaw/skills

Advanced filesystem operations for listing files, searching content, batch processing, and directory analysis. Supports recursive search, file type filtering, size analysis, and batch operations like copy/move/delete. Use when you need to: list directory contents, search for files by name or content, analyze directory structures, perform batch file operations, or analyze file sizes and distribution.

General Utilities

yt-dlp

3891
from openclaw/skills

A robust CLI wrapper for yt-dlp to download videos, playlists, and audio from YouTube and thousands of other sites. Supports format selection, quality control, metadata embedding, and cookie authentication.

General Utilities

time-checker

3891
from openclaw/skills

Check accurate current time, date, and timezone information for any location worldwide using time.is. Use when the user asks "what time is it in X", "current time in Y", or needs to verify timezone offsets.

General Utilities

pihole-ctl

3891
from openclaw/skills

Manage and monitor local Pi-hole instance. Query FTL database for statistics (blocked ads, top clients) and control service via CLI. Use when user asks "how many ads blocked", "pihole status", or "update gravity".

General Utilities

mermaid-architect

3891
from openclaw/skills

Generate beautiful, hand-drawn Mermaid diagrams with robust syntax (quoted labels, ELK layout). Use this skill when the user asks for "diagram", "flowchart", "sequence diagram", or "visualize this process".

General Utilities

memory-cache

3891
from openclaw/skills

High-performance temporary storage system using Redis. Supports namespaced keys (mema:*), TTL management, and session context caching. Use for: (1) Saving agent state, (2) Caching API results, (3) Sharing data between sub-agents.

General Utilities

mema

3891
from openclaw/skills

Mema's personal brain - SQLite metadata index for documents and Redis short-term context buffer. Use for organizing workspace knowledge paths and managing ephemeral session state.

General Utilities

file-organizer-skill

3891
from openclaw/skills

Organize files in directories by grouping them into folders based on their extensions or date. Includes Dry-Run, Recursive, and Undo capabilities.

General Utilities

media-compress

3891
from openclaw/skills

Compress and convert images and videos using ffmpeg. Use when the user wants to reduce file size, change format, resize, or optimize media files. Handles common formats like JPG, PNG, WebP, MP4, MOV, WebM. Triggers on phrases like "compress image", "compress video", "reduce file size", "convert to webp/mp4", "resize image", "make image smaller", "batch compress", "optimize media".

General Utilities

edge-tts

3891
from openclaw/skills

Text-to-speech conversion using node-edge-tts npm package for generating audio from text. Supports multiple voices, languages, speed adjustment, pitch control, and subtitle generation. Use when: (1) User requests audio/voice output with the "tts" trigger or keyword. (2) Content needs to be spoken rather than read (multitasking, accessibility, driving, cooking). (3) User wants a specific voice, speed, pitch, or format for TTS output.

General Utilities