Live Module

Best Sports Lighting Automation for Home Assistant

Transform your game day experience with smart Hue lights synced to live NFL, NBA, NHL, and MLB scores. Install this free Home Assistant automation now.

hub

Common Scenarios

sports_nfl

NFL Sunday Night Football

Watch your favorite NFL matchup with immersive smart lighting. Track Rams vs Seahawks as your Hue lights shift between team blue and Seahawks green with every lead change. The home assistant automation creates a perfect Sunday atmosphere for your game day setup.

sports_basketball

NBA Finals Watch Party

Elevate your NBA viewing with color-changing smart lights. Monitor Lakers vs Celtics as your room pulses with Lakers purple or Celtics green in real-time. The sports automation brings playoff intensity to your home with every basket and timeout.

sports_hockey

NHL Playoff Intensity

Feel every goal with responsive lighting automation. Watch Rangers vs Devils as your smart lights flash Rangers blue or Devils red immediately after each score. Game Light Tracker captures NHL playoff energy through home assistant sync with live scores.

sports_baseball

MLB Classic Matchups

Track America's favorite pastime with full-game smart lighting. Follow Yankees vs Red Sox as your Hue lights display team colors throughout nine innings of baseball. The sports automation supports long MLB seasons with consistent score tracking.

verified_user

Security Integrity Scan

Security LevelDescriptionRecommendation
check_circleLow RiskNo security issues detected. The skill contains only documentation (SKILL.md) with no executable scripts, external code dependencies, or malicious patterns. It references ESPN URLs solely for team abbreviation lookups—these are informational references to public sports data sources, not code execution or data exfiltration points.Safe to install. The skill is documentation-only with no execution capabilities. ESPN URL references are purely informational for team abbreviation lookups. Ensure your Home Assistant API token remains properly secured and never shared publicly when implementing the described automation setup.

Ready to Deploy?

Get started immediately by deploying Game Light Tracker to your infrastructure.

description

SKILL.md Documentation

articleSKILL.md

name: game-light-tracker

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


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

Quick Start

Basic usage:
Track [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 Rams vs Seahawks game and change my backlight to blue when Rams lead, green when Seahawks lead" (NFL)
  • "Monitor Lakers vs Celtics game, purple for Lakers, green for Celtics" (NBA)
  • "Watch Rangers vs Devils game - blue for Rangers, red for Devils" (NHL)
  • "Track Yankees vs Red Sox game, make my living room light blue for Yankees, red for Red Sox" (MLB)
  • How It Works

  • Fetches live scores from ESPN API every 20 seconds
  • Detects lead changes
  • Changes specified Hue light color via Home Assistant
  • Includes auto-restart keeper to prevent timeouts
  • 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:
    .\game-tracker.ps1 -Sport "nfl" -Team1 "AR" -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:
    .\keeper.ps1 -TrackerScript "game-tracker.ps1" -RestartInterval 25
    
    Parameters:
  • -TrackerScript: Path to 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:

  • Identify sport and teams:
  • Get light and color preferences:
  • Load Home Assistant config:
  •    $config = Get-Content ".homeassistant-config.json" | ConvertFrom-Json
    

    $token = $config.token

    $url = $config.url

  • Start game tracker:
  •    .\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"
    
  • Start keeper for auto-restart:
  •    Start-Process powershell -ArgumentList "-File keeper.ps1 -TrackerScript 'game-tracker.ps1'" -WindowStyle Hidden
    
  • Confirm to user:
  • Stopping Tracker

    To stop monitoring:

    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 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
  • downloadDownload .skill File
    quiz

    Common Inquiries

    What sports are supported?expand_more

    Game Light Tracker supports NFL, NBA, NHL, and MLB leagues. Live sports scores are fetched from ESPN API, providing real-time data for all four major American sports leagues with accurate team tracking.

    What do I need to get started?expand_more

    You need Home Assistant configured with Philips Hue lights, a valid Home Assistant API token stored in your config file, and the light entity ID you want to control. The home assistant automation setup requires these three components to sync smart lights with game scores.

    How often do scores update?expand_more

    The system fetches live sports scores from ESPN API every 20 seconds, ensuring your smart lights respond quickly to lead changes and scoring plays during live games.

    Can I use multiple lights?expand_more

    Yes, you can configure multiple Hue lights by specifying multiple light entity IDs in Home Assistant setup. Your smart lights will all sync together to display the same color changes based on game action.

    What happens if game is tied?expand_more

    Game Light Tracker supports an optional third color configuration for tied games. When scores are equal, your smart lights display this designated color until one team takes the lead.

    Ready to expand your fleet?

    Deploy Game Light Tracker across your infrastructure and start scaling your automation capabilities today.

    descriptionView Documentation