@@ -239,8 +239,25 @@ async def async_get_state(config) -> dict:
239
239
240
240
# Never found the team. Either a bye or a post-season condition
241
241
if not found_team :
242
- _LOGGER .debug ("Did not find a game with for the configured team. Is it a bye week?" )
243
- values ["state" ]= 'BYE'
242
+ _LOGGER .debug ("Did not find a game with for the configured team. Checking if it's a bye week." )
243
+ found_bye = False
244
+ values = await async_clear_states (config )
245
+ for bye_team in data ["week" ]["teamsOnBye" ]:
246
+ if team_id .lower ()== bye_team ["abbreviation" ].lower ():
247
+ _LOGGER .debug ("Bye week confirmed." )
248
+ found_bye = True
249
+ values ["team_abbr" ]= bye_team ["abbreviation" ]
250
+ values ["team_name" ]= bye_team ["shortDisplayName" ]
251
+ values ["team_logo" ]= bye_team ["logo" ]
252
+ values ["state" ]= 'BYE'
253
+ values ["last_update" ]= arrow .now ().format (arrow .FORMAT_W3C )
254
+ if found_bye == False :
255
+ _LOGGER .debug ("Team not found in active games or bye week list. Have you missed the playoffs?" )
256
+ values ["team_abbr" ]= None
257
+ values ["team_name" ]= None
258
+ values ["team_logo" ]= None
259
+ values ["state" ]= 'NOT_FOUND'
260
+ values ["last_update" ]= arrow .now ().format (arrow .FORMAT_W3C )
244
261
245
262
if values ["state" ]== 'PRE' and ((arrow .get (values ["date" ])- arrow .now ()).total_seconds ()< 1200 ):
246
263
_LOGGER .debug ("Event is within 20 minutes, setting refresh rate to 5 seconds." )
@@ -260,8 +277,8 @@ async def async_clear_states(config) -> dict:
260
277
values = {}
261
278
# Reset values
262
279
values = {
263
- "state" :"PRE" ,
264
280
"date" :None ,
281
+ "kickoff_in" :None ,
265
282
"quarter" :None ,
266
283
"clock" :None ,
267
284
"venue" :None ,
@@ -272,12 +289,9 @@ async def async_clear_states(config) -> dict:
272
289
"last_play" :None ,
273
290
"down_distance_text" :None ,
274
291
"possession" :None ,
275
- "team_abbr" :None ,
276
292
"team_id" :None ,
277
- "team_name" :None ,
278
293
"team_record" :None ,
279
294
"team_homeaway" :None ,
280
- "team_logo" :None ,
281
295
"team_colors" :None ,
282
296
"team_score" :None ,
283
297
"team_win_probability" :None ,