NHL API Custom Component - Track your favorite hockey team in Home Assistant!

It’s all good, Thanks for the information.

1 Like

Would it be possible to get the World Junior data?

Unfortunately, that data isn’t provided through the NHL API. I’m not certain if the IIHF exposes any data for the World Juniors.

have the same issue with entities not available. can you share your final product?

nvm, had to remove template out of the lovelace yaml. - “entity: sensor.away_team”

I’m wondering how I can get a sound to play when my team is scored on? AI has been super useless. Any ideas?

Assuming you’re setting up your automation via the UI:

  1. Click Add Trigger
  2. Select Other trigger
  3. Select Manual event
  4. Event type: nhl_goal
  5. Event data: goal_tracked_team: false

The above will ensure the automation is triggered when your team gets scored on. You can then create your action to play the sound based on whatever speaker you have.

My family loves this! My 6 year old daughter did come up with a feature request. Is it possible to pull out which player scored? I’ve browsed through the API to the best of my ability (which is basically non-existent) and didn’t see if they even provide that information there but she’d love it if after the goal horn sounded it would announce who scored.
Thanks!

Hi @Tical84 check the latest release. I added the scoring player, and primary and secondary assist players. Tell your 6 yo this was just for them :wink:

Awesome!!! Thank you. I just saw this reply and that was so fast. I’ll have to update tonight and add it to my automation before the first goal.

Is this integration down for everyone else as well?

My automations didn’t trigger a couple days ago during a game I was watching. My team hasn’t played since then so not sure if it’s working again or not.

There was a change in the API. I will make an update soon that will resolve the issue.

1 Like

It seems the NHL sensor updates the time and state of game correctly (it’s currently showing the game I’m watching went live at 6:08 but the attributes are still showing 0-0 with 20 minutes left in the first but it’s currently 2-0 with 8:40 left in the first.