Skip to content

Commit

Permalink
Merge pull request #28 from gonzotek/master
Browse files Browse the repository at this point in the history
  • Loading branch information
zacs authored Oct 2, 2022
2 parents bf46ecd + 509badc commit edd0ff8
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 10 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/hacs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: HACS Action

on:
push:
pull_request:
schedule:
- cron: "0 0 * * *"

jobs:
hacs:
name: HACS Action
runs-on: "ubuntu-latest"
steps:
- name: HACS Action
uses: "hacs/action@main"
with:
category: "integration"
ignore: "images"
12 changes: 8 additions & 4 deletions custom_components/nfl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,14 @@ async def async_get_state(config) -> dict:
values["date"] = event["date"]
values["kickoff_in"] = arrow.get(event["date"]).humanize()
values["venue"] = event["competitions"][0]["venue"]["fullName"]
values["location"] = "%s, %s" % (
event["competitions"][0]["venue"]["address"]["city"],
event["competitions"][0]["venue"]["address"]["state"],
)
try:
values["location"] = "%s, %s" % (
event["competitions"][0]["venue"]["address"]["city"],
event["competitions"][0]["venue"]["address"]["state"] if (
"state" in event["competitions"][0]["venue"]["address"] ) else ""
)
except:
values["location"] = event["competitions"][0]["venue"]["address"]["city"]
try:
values["tv_network"] = event["competitions"][0]["broadcasts"][0][
"names"
Expand Down
6 changes: 2 additions & 4 deletions custom_components/nfl/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"team_id": "Team Acronym",
"timeout": "Update Timeout (in seconds)"
},
"description": "You can find your 2 or 3-letter acronym on the ESPN NFL page's banner, at the top score strip.",
"title": "NFL"
"description": "You can find your 2 or 3-letter acronym on the ESPN NFL page's banner, at the top score strip."
}
}
},
Expand All @@ -20,8 +19,7 @@
"team_id": "Team Acronym",
"timeout": "Update Timeout (in seconds)"
},
"description": "You can find your 2 or 3-letter acronym on the ESPN NFL page's banner, at the top score strip.",
"title": "NFL"
"description": "You can find your 2 or 3-letter acronym on the ESPN NFL page's banner, at the top score strip."
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions hacs.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"name": "NFL",
"domains": [ "sensor" ],
"homeassistant": "0.95.4",
"iot_class": "Cloud Polling",
"render_readme": true
}

0 comments on commit edd0ff8

Please sign in to comment.