NHL Goal and Win Celebration

I’ve seen a couple different takes on NHL goal score automations on here. Here’s mine! I started out with just wanting to blink a smart light the blue color of my team when a goal is scored. Ended up with playing a Youtube video and tts simulation of in stadium goal scorer and assist announcement. Something that might be unique is that it uses ESPN as the primary source, then uses the NHL api as a backup. The currently untested documentation and the .yaml files are available via the GitHub link. Known limitation- the automation does not track shootout goals. As described in the README, there is a 45 second delay to allow time for the sources to provide the scorer/assist information and allows for any delays for those watching via streaming. Since settling on a production ready version, I have not seen the trigger fire the automation ahead of watching a game live. If you pause games longer than 45 seconds, you might want to disable the automation to avoid spoiler. Here’s the GitHub link- GitHub - kjdavwork/HA_NHL_Goal_Celebration: Home assistant automation that plays video and blinks smart lights when your team scores

Stadium Experience at Home - NHL Goal Celebration with 97.6% Reliability

After months of development and testing across 40+ goals in 10+ games, I’ve built an NHL goal celebration automation that actually works reliably in production.

What It Does

When your team scores:

  • :speaker_high_volume: Goal horn plays (YouTube video on your media player)
  • :light_bulb: Lights flash in team colors (5 times)
  • :loudspeaker: TTS announces full details: “Tampa Bay Lightning goal! At 14:32 of the second period. Scored by number 86, Nikita Kucherov! Assisted by number 77, Victor Hedman!”
  • :trophy: Win celebration triggers post-game with special light show

Why It’s Reliable

The Challenge: ESPN’s API updates at unpredictable speeds. Sometimes goal data appears immediately, sometimes it takes 30+ seconds, and sometimes it never shows up.

The Solution:

  • Dual-source system - ESPN primary with NHL API automatic fallback
  • Smart polling loop - Checks every 5 seconds for up to 45 seconds until goal data appears
  • 97.6% success rate across extensive real-world testing

Features

:white_check_mark: Works for any NHL team (just customize sensor names and team colors)
:white_check_mark: Handles home and away games
:white_check_mark: Natural announcements (“second period” not “period 2”)
:white_check_mark: Optional debug mode - Toggle on/off without editing code
:white_check_mark: Smart light restoration - Returns to previous state after celebration
:white_check_mark: 45-second streaming delay built-in - No spoilers for streaming viewers
:white_check_mark: Tested and production-ready since December 2025

Known Limitations

  • Shootout goals don’t trigger (NHL doesn’t count these as “goals”)
  • If you pause your stream for 45+ seconds, disable the automation to avoid spoilers

Requirements

  • ESPN sensor integration (HACS)
  • NHL API sensor integration (HACS)
  • Smart light (LIFX, Hue, etc.)
  • Media player (Google Home, Chromecast, Echo)
  • TTS service (Amazon Polly, Google TTS, etc.)

GitHub Repository

Complete documentation, installation guide, and ready-to-import YAML files:
GitHub - kjdavwork/HA_NHL_Goal_Celebration: Home assistant automation that plays video and blinks smart lights when your team scores · GitHub

Includes:

  • Step-by-step setup guide
  • Customization instructions (team colors, goal horn, etc.)
  • Troubleshooting section
  • Script + automation files

Questions for the Community

  • Has anyone adapted this for other sports (NBA, NFL, MLB)?
  • What streaming delays are you experiencing? (I’ve tested with 45 seconds)
  • Would anyone find value in a Home Assistant Blueprint version?

Happy to answer questions or help with setup. Go Bolts! :high_voltage::ice_hockey: