We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
2 parents2bef65d +f141ca3 commit58a5b4eCopy full SHA for 58a5b4e
custom_components/nfl/__init__.py
@@ -169,7 +169,10 @@ async def async_get_state(config) -> dict:
169
values["kickoff_in"]=arrow.get(event["date"]).humanize()
170
values["venue"]=event["competitions"][0]["venue"]["fullName"]
171
values["location"]="%s, %s"% (event["competitions"][0]["venue"]["address"]["city"],event["competitions"][0]["venue"]["address"]["state"])
172
-values["tv_network"]=event["competitions"][0]["broadcasts"][0]["names"][0]
+try:
173
+values["tv_network"]=event["competitions"][0]["broadcasts"][0]["names"][0]
174
+except:
175
+values["tv_network"]=None
176
ifevent["status"]["type"]["state"].lower()in ['pre']:# odds only exist pre-game
177
values["odds"]=event["competitions"][0]["odds"][0]["details"]
178
values["overunder"]=event["competitions"][0]["odds"][0]["overUnder"]