NHL Game Sensor and Card

After restarting HA always the Sensor Edmonton is not available. have you a idea?

Can you let me know what the log says? Any errors? I know I got it but pretty sure I pushed an update to fix it. What release are you on?

I have Release v0.2. of the Card. since today morning ā€œsensor is unavailableā€. Only for Edmonton. Others are ok. Here the only Log Entry

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: homeassistant
Source: custom_components/nhl/sensor.py:160
Integration: NHL (documentation, issues)
First occurred: 31. Januar 2022, 15:45:48 (347 occurrences)
Last logged: 07:36:21

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 134, in _handle_refresh_interval
    await self._async_refresh(log_failures=True, scheduled=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 265, in _async_refresh
    update_callback()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 325, in _handle_coordinator_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 505, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 541, in _async_write_ha_state
    extra_state_attributes = self.extra_state_attributes
  File "/config/custom_components/nhl/sensor.py", line 160, in extra_state_attributes
    attrs["team_period_1"] = self.coordinator.data["team_period_1"]
KeyError: 'team_period_1'

ok i have a secon Error from the Card

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: custom_components.nhl
Source: helpers/update_coordinator.py:219
Integration: NHL (documentation, issues)
First occurred: 01:38:26 (3 occurrences)
Last logged: 04:16:08

Error fetching Edmonton data: 'linescores'
Error fetching Colorado data: Cannot connect to host site.api.espn.com:80 ssl:default [Try again]
Error fetching PHI data: Cannot connect to host site.api.espn.com:80 ssl:default [Try again]

Pushing the update. Seems it never pushed when I thought it did. That 2nd error I think is espn having an issue. I got it as well. Working on the updates now.

Thanks for working on this - what an excellent custom component!

Game tracking worked really well, but unfortunately I ran into the same error as flatty2804 (the first error) after the game (I am on v0.3). It happened when the game finished - sensor status stayed stuck on ā€œINā€ and HA generated the error in log.

I just updated a new version now. Please give it a shot. It looks like I pushed up a half written version of something I was doing in order to try and pull each periods score and then on a new version of the card display those. I also put a fix up and forgot to create a new release for it. Newest v0.4 should be good to go. Is this something you guys would like to see on the card? Also I do appreciate the kind words.

Just updated to 0.4 and it seems everything is working. for me the Card is perfect as it is. the only nice to have thing would be a translation in German :-). Because my whole HA is in German. Otherwise I think the card is great.

1 Like

Iā€™ll look to see how I can get into allowing that to happen and will gladly start adding translations.

1 Like

Thanks, I can confirm v0.4 works without any issues. Great job!

Quick question - how often does the sensor refresh the data? Is the API call frequency different during the game?

Hi,
Loving this so far but noticed a few things with the card. Two are nitpicking but one is a little more major.

  1. The home team seems to be on the left, where itā€™s usually on the right (read as Team A @ Team B)

  2. It says Q1 for the period. Iā€™m assuming thatā€™s a holdover from the NFL version.

Those are my nitpicks.

  1. The more major one is it seems to only show when the team you enter is at home. Iā€™m also an Oilers fan and last night worked great but today itā€™s showing the next game isnā€™t until next Tuesday. I checked their schedule and their next home game is next Tuesday. They play 3 more times between then though. Any thoughts on why that might be?

Thanks for your work.

1 Like

Anyone compare speed of goal events with the other popular NHL game sensor?

1 Like

@SimplySynced - Are you still maintaining the front end custom card for the nhl integration? Iā€™m running 2023.11 and since 2023.10 Iā€™ve noticed that Iā€™m getting the following error and I donā€™t know why. The sensor info all returns correctly. Just for some reason the lovelace card is erroring out.

image

Note: I previously logged an issue for this on Github. Any chance someone else is having the same problem?

NOTE: If someone stumbles across this thread, someone commented to me in the Github repo that theyā€™re having the same issue above since 2023.10 as well.

Unless @SimplySynced responds I would presume that this custom card and support of the integration is dead. I would suggest looking elsewhere for a supported integration and custom Lovelace card.

Does anyone have an alternative custom integration and card thatā€™s supported and theyā€™d recommend instead?

Hello, I havenā€™t had a chance to look at this just yet but will take a peak this week to see what breaking change had occurred. Apologies on the delay!

Is there any update on this as Iā€™m having the same issue too.