zacs / ha-nfl

NFL game scores custom component for Home Assistant
42 stars 32 forks source link

London game not working #27

Closed stepaniak closed 1 year ago

stepaniak commented 1 year ago

It seems there is an issue with the game in London this week. I have tried setting my sensor to Vikings and New Orleans and both return errors. Other teams work fine (tried GB and ATL).

Log Details (ERROR) This error originated from a custom integration. Logger: custom_components.nfl Source: helpers/update_coordinator.py:182 Integration: NFL (documentation, issues) First occurred: 11:05:04 AM (5 occurrences) Last logged: 11:18:31 AM

Error fetching Vikings data: 'state'

gonzotek commented 1 year ago

It's the location - it's missing the 'state'. PR incoming short...

zacs commented 1 year ago

Hah, same error got hit with the NCAAF fork of this. Should've proactively fixed. Will approve PR once in, or fix myself in a couple hours when my kids are down :)

gonzotek commented 1 year ago

Sorry I didn't get to it last night. Just opened a PR with a small fix for location, however the hassfest check is failing with a translation error :-(

stepaniak commented 1 year ago

Also keep in mind there are games in Munich and Mexico City this year.

gonzotek commented 1 year ago

The fix in my PR uses only the city name field if there's any error raised trying to load both the city and state, so in theory, it should work for those games as well. We'll want to keep an eye on those games just the same.

LCMilstein commented 1 year ago

I'm seeing the issue still now with the Giants game coming in London. Anything we need to do to update?

D34DC3N73R commented 1 year ago

Yeah I'm getting this too with the 0.5 update

Logger: custom_components.nfl Source: helpers/update_coordinator.py:182 Integration: NFL (documentation, issues) First occurred: 6:03:05 AM (2 occurrences) Last logged: 7:26:03 AM

Error fetching NFL data: 'state'

gonzotek commented 1 year ago

@zacs will need to cut a fresh release for HACS to pick it up. I just added the Giants game to my local HA (which is running my updated code) and the pre-game data looks good. If you want to hand-edit your copy in the meantime, the changes are in this commit: https://github.com/zacs/ha-nfl/pull/28/commits/39f9b458c810d68b2300a61368c76fc792203ae0

I believe if you hand-edit it, it'll simply get overwritten when updating to the next release, which will contain the fix as well. Standard disclaimers apply: Be careful editing the code by hand, formatting mistakes can break python easily; I'm not responsible if after using this your team goes down in flames, and your spouse leaves with your dog, truck & best friend, etc.

LCMilstein commented 1 year ago

Hand edit worked perfectly! Thanks for the direction.

zacs commented 1 year ago

Whoops, will release today!

zacs commented 1 year ago

fixed in #28