zacs / ha-nfl

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

API returning not found #13

Closed bgulla closed 2 years ago

bgulla commented 2 years ago

Ever since this monday, my NFL integration is returning 'NOT FOUND' (entity state) and 'null' for all attributes. I installed a fresh integration on a new HA instance and the problem still persisted.

The queries for BAL and HOU both came back with NOT FOUND, so I do not believe this is isolated to a team.

mattwalden014 commented 2 years ago

Also having the same issue

bgulla commented 2 years ago

http://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard is returning a 404 and it's the primary API endpoint listed in const.py

zacs commented 2 years ago

It looks like the API only goes a week in, so only data for JAX and OAK exists, so I think this is by design. Once that game is over we will see what parts of the payload get broken this year 😬.

zacs commented 2 years ago

http://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard is returning a 404 and it's the primary API endpoint listed in const.py

I get data for it (tried a few hours ago and again just now) just fine, but it's limited to the first preseason game (since it's ~a week earlier than the rest).

NOT_FOUND is a state I made up for the component, if the API times out or 404s you should see an Unavailable state.

mattwalden014 commented 2 years ago

Thanks @zacs. They must've changed how far in advance it's publishing games on the API as I had previously been seeing other preseason games.

zacs commented 2 years ago

Thanks @zacs. They must've changed how far in advance it's publishing games on the API as I had previously been seeing other preseason games.

Interesting! To be honest I haven't paid attention to my sensors lately (maybe I should keep it that way since I'm a Seattle fan...), so I didn't notice. My guess is that once we got within 7 (or some similar number) days of the first game the ESPN system snapped into "in season" mode.

I'll try at least adding OAK/JAX to get started testing if there are any format changes this year.

zacs commented 2 years ago

@bgulla please re-open if you see any more 404s. Suspecting we may have seen some as a result of ESPN going into "in-season mode" and maybe deploying some new code, etc. Hopefully won't see again this season.