NFL game sensor (scores, possession, etc)

I tried NFC and AFC for the team acronym, but they’re both coming up in Home Assistant developer tools as state unavailable (other ‘real’ teams are NOT_FOUND, as expected from the raw JSON). The espn data shows an event for this weekend with shortName as ‘AFC @ NFC’, for what it’s worth.

/edit: Logged a Github issue with the JSON as file attachment

(capture of raw JSON in case it changes before anyone can take a look):


{"leagues":[{"id":"28","uid":"s:20~l:28","name":"National Football League","abbreviation":"NFL","slug":"nfl","season":{"year":2021,"startDate":"2021-07-17T07:00Z","endDate":"2022-02-16T07:59Z","type":{"id":"3","type":3,"name":"Postseason","abbreviation":"post"}},"calendarType":"list","calendarIsWhitelist":true,"calendarStartDate":"2021-07-17T07:00Z","calendarEndDate":"2022-02-16T07:59Z","calendar":[{"label":"Preseason","value":"1","startDate":"2021-07-17T07:00Z","endDate":"2021-09-09T06:59Z","entries":[{"label":"Hall of Fame Weekend","alternateLabel":"HOF","detail":"Jul 17-Aug 10","value":"1","startDate":"2021-07-17T07:00Z","endDate":"2021-08-11T06:59Z"},{"label":"Preseason Week 1","alternateLabel":"Pre Wk 1","detail":"Aug 11-17","value":"2","startDate":"2021-08-11T07:00Z","endDate":"2021-08-18T06:59Z"},{"label":"Preseason Week 2","alternateLabel":"Pre Wk 2","detail":"Aug 18-24","value":"3","startDate":"2021-08-18T07:00Z","endDate":"2021-08-25T06:59Z"},{"label":"Preseason Week 3","alternateLabel":"Pre Wk 3","detail":"Aug 25-31","value":"4","startDate":"2021-08-25T07:00Z","endDate":"2021-09-01T06:59Z"}]},{"label":"Regular Season","value":"2","startDate":"2021-09-09T07:00Z","endDate":"2022-01-12T07:59Z","entries":[{"label":"Week 1","alternateLabel":"Week 1","detail":"Sep 9-14","value":"1","startDate":"2021-09-09T07:00Z","endDate":"2021-09-15T06:59Z"},{"label":"Week 2","alternateLabel":"Week 2","detail":"Sep 15-21","value":"2","startDate":"2021-09-15T07:00Z","endDate":"2021-09-22T06:59Z"},{"label":"Week 3","alternateLabel":"Week 3","detail":"Sep 22-28","value":"3","startDate":"2021-09-22T07:00Z","endDate":"2021-09-29T06:59Z"},{"label":"Week 4","alternateLabel":"Week 4","detail":"Sep 29-Oct 5","value":"4","startDate":"2021-09-29T07:00Z","endDate":"2021-10-06T06:59Z"},{"label":"Week 5","alternateLabel":"Week 5","detail":"Oct 6-12","value":"5","startDate":"2021-10-06T07:00Z","endDate":"2021-10-13T06:59Z"},{"label":"Week 6","alternateLabel":"Week 6","detail":"Oct 13-19","value":"6","startDate":"2021-10-13T07:00Z","endDate":"2021-10-20T06:59Z"},{"label":"Week 7","alternateLabel":"Week 7","detail":"Oct 20-26","value":"7","startDate":"2021-10-20T07:00Z","endDate":"2021-10-27T06:59Z"},{"label":"Week 8","alternateLabel":"Week 8","detail":"Oct 27-Nov 2","value":"8","startDate":"2021-10-27T07:00Z","endDate":"2021-11-03T06:59Z"},{"label":"Week 9","alternateLabel":"Week 9","detail":"Nov 3-9","value":"9","startDate":"2021-11-03T07:00Z","endDate":"2021-11-10T07:59Z"},{"label":"Week 10","alternateLabel":"Week 10","detail":"Nov 10-16","value":"10","startDate":"2021-11-10T08:00Z","endDate":"2021-11-17T07:59Z"},{"label":"Week 11","alternateLabel":"Week 11","detail":"Nov 17-23","value":"11","startDate":"2021-11-17T08:00Z","endDate":"2021-11-24T07:59Z"},{"label":"Week 12","alternateLabel":"Week 12","detail":"Nov 24-30","value":"12","startDate":"2021-11-24T08:00Z","endDate":"2021-12-01T07:59Z"},{"label":"Week 13","alternateLabel":"Week 13","detail":"Dec 1-7","value":"13","startDate":"2021-12-01T08:00Z","endDate":"2021-12-08T07:59Z"},{"label":"Week 14","alternateLabel":"Week 14","detail":"Dec 8-14","value":"14","startDate":"2021-12-08T08:00Z","endDate":"2021-12-15T07:59Z"},{"label":"Week 15","alternateLabel":"Week 15","detail":"Dec 15-21","value":"15","startDate":"2021-12-15T08:00Z","endDate":"2021-12-22T07:59Z"},{"label":"Week 16","alternateLabel":"Week 16","detail":"Dec 22-28","value":"16","startDate":"2021-12-22T08:00Z","endDate":"2021-12-29T07:59Z"},{"label":"Week 17","alternateLabel":"Week 17","detail":"Dec 29-Jan 4","value":"17","startDate":"2021-12-29T08:00Z","endDate":"2022-01-05T07:59Z"},{"label":"Week 18","alternateLabel":"Week 18","detail":"Jan 5-11","value":"18","startDate":"2022-01-05T08:00Z","endDate":"2022-01-12T07:59Z"}]},{"label":"Postseason","value":"3","startDate":"2022-01-12T08:00Z","endDate":"2022-02-16T07:59Z","entries":[{"label":"Wild Card","alternateLabel":"Wild Card","detail":"Jan 12-18","value":"1","startDate":"2022-01-12T08:00Z","endDate":"2022-01-19T07:59Z"},{"label":"Divisional Round","alternateLabel":"Div Rd","detail":"Jan 19-25","value":"2","startDate":"2022-01-19T08:00Z","endDate":"2022-01-26T07:59Z"},{"label":"Conference Championship","alternateLabel":"Conf Champ","detail":"Jan 26-Feb 1","value":"3","startDate":"2022-01-26T08:00Z","endDate":"2022-02-02T07:59Z"},{"label":"Pro Bowl","alternateLabel":"Pro Bowl","detail":"Feb 2-8","value":"4","startDate":"2022-02-02T08:00Z","endDate":"2022-02-09T07:59Z"},{"label":"Super Bowl","alternateLabel":"Super Bowl","detail":"Feb 9-15","value":"5","startDate":"2022-02-09T08:00Z","endDate":"2022-02-16T07:59Z"}]},{"label":"Off Season","value":"4","startDate":"2022-02-16T08:00Z","endDate":"2022-08-01T06:59Z","entries":[{"label":"Week 1","alternateLabel":"Week 1","detail":"Feb 16-Jul 31","value":"1","startDate":"2022-02-16T08:00Z","endDate":"2022-08-01T06:59Z"}]}]}],"season":{"type":3,"year":2021},"week":{"number":4},"events":[{"id":"401326637","uid":"s:20~l:28~e:401326637","date":"2022-02-06T20:00Z","name":"AFC  at NFC ","shortName":"AFC @ NFC","season":{"year":2021,"type":3,"slug":"post-season"},"competitions":[{"id":"401326637","uid":"s:20~l:28~e:401326637~c:401326637","date":"2022-02-06T20:00Z","attendance":0,"type":{"id":"4","abbreviation":"ALLSTAR"},"timeValid":true,"neutralSite":true,"conferenceCompetition":false,"recent":false,"venue":{"id":"6501","fullName":"Allegiant Stadium","address":{"city":"Las Vegas","state":"NV"},"capacity":65000,"indoor":true},"competitors":[{"id":"32","uid":"s:20~l:28~t:32","type":"team","order":0,"homeAway":"home","team":{"id":"32","uid":"s:20~l:28~t:32","location":"NFC","abbreviation":"NFC","displayName":"NFC","shortDisplayName":"NFC","isActive":false,"links":[{"rel":["scores","sportscenter","app","team"],"href":"sportscenter://x-callback-url/showClubhouse?uid=s:20~l:28~t:32&section=scores","text":"Scores","isExternal":false,"isPremium":false},{"rel":["draftpicks","desktop","team"],"href":"http://www.espn.com/nfl/draft/teams/_/name/nfc/nfc","text":"Draft Picks","isExternal":false,"isPremium":true},{"rel":["transactions","desktop","team"],"href":"https://www.espn.com/nfl/team/transactions/_/name/nfc","text":"Transactions","isExternal":false,"isPremium":false},{"rel":["injuries","desktop","team"],"href":"https://www.espn.com/nfl/team/injuries/_/name/nfc","text":"Injuries","isExternal":false,"isPremium":false},{"rel":["depthchart","desktop","team"],"href":"https://www.espn.com/nfl/team/depth/_/name/nfc","text":"Depth Chart","isExternal":false,"isPremium":false}],"logo":"https://a.espncdn.com/i/teamlogos/nfl/500/scoreboard/nfc.png"},"score":"0","statistics":[]},{"id":"31","uid":"s:20~l:28~t:31","type":"team","order":1,"homeAway":"away","team":{"id":"31","uid":"s:20~l:28~t:31","location":"AFC","abbreviation":"AFC","displayName":"AFC","shortDisplayName":"AFC","isActive":false,"links":[{"rel":["scores","sportscenter","app","team"],"href":"sportscenter://x-callback-url/showClubhouse?uid=s:20~l:28~t:31&section=scores","text":"Scores","isExternal":false,"isPremium":false},{"rel":["draftpicks","desktop","team"],"href":"http://www.espn.com/nfl/draft/teams/_/name/afc/afc","text":"Draft Picks","isExternal":false,"isPremium":true},{"rel":["transactions","desktop","team"],"href":"https://www.espn.com/nfl/team/transactions/_/name/afc","text":"Transactions","isExternal":false,"isPremium":false},{"rel":["injuries","desktop","team"],"href":"https://www.espn.com/nfl/team/injuries/_/name/afc","text":"Injuries","isExternal":false,"isPremium":false},{"rel":["depthchart","desktop","team"],"href":"https://www.espn.com/nfl/team/depth/_/name/afc","text":"Depth Chart","isExternal":false,"isPremium":false}],"logo":"https://a.espncdn.com/i/teamlogos/nfl/500/scoreboard/afc.png"},"score":"0","statistics":[]}],"notes":[{"type":"event","headline":"Pro Bowl"}],"status":{"clock":0.0,"displayClock":"0:00","period":0,"type":{"id":"1","name":"STATUS_SCHEDULED","state":"pre","completed":false,"description":"Scheduled","detail":"Sun, February 6th at 3:00 PM EST","shortDetail":"2/6 - 3:00 PM EST"}},"broadcasts":[{"market":"national","names":["ESPN","ABC"]}],"format":{"regulation":{"periods":4}},"tickets":[{"summary":"Tickets as low as $62","numberAvailable":3168,"links":[{"href":"https://www.vividseats.com/nfl/nfl-pro-bowl-tickets/nfl-pro-bowl-2-6-3620846.html?wsUser=717"},{"href":"https://www.vividseats.com/allegiant-stadium-tickets/venue/25873?wsUser=717"}]}],"startDate":"2022-02-06T20:00Z","geoBroadcasts":[{"type":{"id":"1","shortName":"TV"},"market":{"id":"1","type":"National"},"media":{"shortName":"ESPN"},"lang":"en","region":"us"},{"type":{"id":"1","shortName":"TV"},"market":{"id":"1","type":"National"},"media":{"shortName":"ABC"},"lang":"en","region":"us"}]}],"links":[{"language":"en-US","rel":["summary","desktop","event"],"href":"https://www.espn.com/nfl/game/_/gameId/401326637","text":"Gamecast","shortText":"Gamecast","isExternal":false,"isPremium":false}],"weather":{"displayValue":"Sunny","temperature":61,"highTemperature":61,"conditionId":"1","link":{"language":"en-US","rel":["89118"],"href":"http://www.accuweather.com/en/us/allegiant-stadium-nv/89101/hourly-weather-forecast/209206_poi?day=4&hbhhour=12&lang=en-us","text":"Weather","shortText":"Weather","isExternal":true,"isPremium":false}},"status":{"clock":0.0,"displayClock":"0:00","period":0,"type":{"id":"1","name":"STATUS_SCHEDULED","state":"pre","completed":false,"description":"Scheduled","detail":"Sun, February 6th at 3:00 PM EST","shortDetail":"2/6 - 3:00 PM EST"}}}]}

Prettified:

{
  "leagues": [
    {
      "id": "28",
      "uid": "s:20~l:28",
      "name": "National Football League",
      "abbreviation": "NFL",
      "slug": "nfl",
      "season": {
        "year": 2021,
        "startDate": "2021-07-17T07:00Z",
        "endDate": "2022-02-16T07:59Z",
        "type": {
          "id": "3",
          "type": 3,
          "name": "Postseason",
          "abbreviation": "post"
        }
      },
      "calendarType": "list",
      "calendarIsWhitelist": true,
      "calendarStartDate": "2021-07-17T07:00Z",
      "calendarEndDate": "2022-02-16T07:59Z",
      "calendar": [
        {
          "label": "Preseason",
          "value": "1",
          "startDate": "2021-07-17T07:00Z",
          "endDate": "2021-09-09T06:59Z",
          "entries": [
            {
              "label": "Hall of Fame Weekend",
              "alternateLabel": "HOF",
              "detail": "Jul 17-Aug 10",
              "value": "1",
              "startDate": "2021-07-17T07:00Z",
              "endDate": "2021-08-11T06:59Z"
            },
            {
              "label": "Preseason Week 1",
              "alternateLabel": "Pre Wk 1",
              "detail": "Aug 11-17",
              "value": "2",
              "startDate": "2021-08-11T07:00Z",
              "endDate": "2021-08-18T06:59Z"
            },
            {
              "label": "Preseason Week 2",
              "alternateLabel": "Pre Wk 2",
              "detail": "Aug 18-24",
              "value": "3",
              "startDate": "2021-08-18T07:00Z",
              "endDate": "2021-08-25T06:59Z"
            },
            {
              "label": "Preseason Week 3",
              "alternateLabel": "Pre Wk 3",
              "detail": "Aug 25-31",
              "value": "4",
              "startDate": "2021-08-25T07:00Z",
              "endDate": "2021-09-01T06:59Z"
            }
          ]
        },
        {
          "label": "Regular Season",
          "value": "2",
          "startDate": "2021-09-09T07:00Z",
          "endDate": "2022-01-12T07:59Z",
          "entries": [
            {
              "label": "Week 1",
              "alternateLabel": "Week 1",
              "detail": "Sep 9-14",
              "value": "1",
              "startDate": "2021-09-09T07:00Z",
              "endDate": "2021-09-15T06:59Z"
            },
            {
              "label": "Week 2",
              "alternateLabel": "Week 2",
              "detail": "Sep 15-21",
              "value": "2",
              "startDate": "2021-09-15T07:00Z",
              "endDate": "2021-09-22T06:59Z"
            },
            {
              "label": "Week 3",
              "alternateLabel": "Week 3",
              "detail": "Sep 22-28",
              "value": "3",
              "startDate": "2021-09-22T07:00Z",
              "endDate": "2021-09-29T06:59Z"
            },
            {
              "label": "Week 4",
              "alternateLabel": "Week 4",
              "detail": "Sep 29-Oct 5",
              "value": "4",
              "startDate": "2021-09-29T07:00Z",
              "endDate": "2021-10-06T06:59Z"
            },
            {
              "label": "Week 5",
              "alternateLabel": "Week 5",
              "detail": "Oct 6-12",
              "value": "5",
              "startDate": "2021-10-06T07:00Z",
              "endDate": "2021-10-13T06:59Z"
            },
            {
              "label": "Week 6",
              "alternateLabel": "Week 6",
              "detail": "Oct 13-19",
              "value": "6",
              "startDate": "2021-10-13T07:00Z",
              "endDate": "2021-10-20T06:59Z"
            },
            {
              "label": "Week 7",
              "alternateLabel": "Week 7",
              "detail": "Oct 20-26",
              "value": "7",
              "startDate": "2021-10-20T07:00Z",
              "endDate": "2021-10-27T06:59Z"
            },
            {
              "label": "Week 8",
              "alternateLabel": "Week 8",
              "detail": "Oct 27-Nov 2",
              "value": "8",
              "startDate": "2021-10-27T07:00Z",
              "endDate": "2021-11-03T06:59Z"
            },
            {
              "label": "Week 9",
              "alternateLabel": "Week 9",
              "detail": "Nov 3-9",
              "value": "9",
              "startDate": "2021-11-03T07:00Z",
              "endDate": "2021-11-10T07:59Z"
            },
            {
              "label": "Week 10",
              "alternateLabel": "Week 10",
              "detail": "Nov 10-16",
              "value": "10",
              "startDate": "2021-11-10T08:00Z",
              "endDate": "2021-11-17T07:59Z"
            },
            {
              "label": "Week 11",
              "alternateLabel": "Week 11",
              "detail": "Nov 17-23",
              "value": "11",
              "startDate": "2021-11-17T08:00Z",
              "endDate": "2021-11-24T07:59Z"
            },
            {
              "label": "Week 12",
              "alternateLabel": "Week 12",
              "detail": "Nov 24-30",
              "value": "12",
              "startDate": "2021-11-24T08:00Z",
              "endDate": "2021-12-01T07:59Z"
            },
            {
              "label": "Week 13",
              "alternateLabel": "Week 13",
              "detail": "Dec 1-7",
              "value": "13",
              "startDate": "2021-12-01T08:00Z",
              "endDate": "2021-12-08T07:59Z"
            },
            {
              "label": "Week 14",
              "alternateLabel": "Week 14",
              "detail": "Dec 8-14",
              "value": "14",
              "startDate": "2021-12-08T08:00Z",
              "endDate": "2021-12-15T07:59Z"
            },
            {
              "label": "Week 15",
              "alternateLabel": "Week 15",
              "detail": "Dec 15-21",
              "value": "15",
              "startDate": "2021-12-15T08:00Z",
              "endDate": "2021-12-22T07:59Z"
            },
            {
              "label": "Week 16",
              "alternateLabel": "Week 16",
              "detail": "Dec 22-28",
              "value": "16",
              "startDate": "2021-12-22T08:00Z",
              "endDate": "2021-12-29T07:59Z"
            },
            {
              "label": "Week 17",
              "alternateLabel": "Week 17",
              "detail": "Dec 29-Jan 4",
              "value": "17",
              "startDate": "2021-12-29T08:00Z",
              "endDate": "2022-01-05T07:59Z"
            },
            {
              "label": "Week 18",
              "alternateLabel": "Week 18",
              "detail": "Jan 5-11",
              "value": "18",
              "startDate": "2022-01-05T08:00Z",
              "endDate": "2022-01-12T07:59Z"
            }
          ]
        },
        {
          "label": "Postseason",
          "value": "3",
          "startDate": "2022-01-12T08:00Z",
          "endDate": "2022-02-16T07:59Z",
          "entries": [
            {
              "label": "Wild Card",
              "alternateLabel": "Wild Card",
              "detail": "Jan 12-18",
              "value": "1",
              "startDate": "2022-01-12T08:00Z",
              "endDate": "2022-01-19T07:59Z"
            },
            {
              "label": "Divisional Round",
              "alternateLabel": "Div Rd",
              "detail": "Jan 19-25",
              "value": "2",
              "startDate": "2022-01-19T08:00Z",
              "endDate": "2022-01-26T07:59Z"
            },
            {
              "label": "Conference Championship",
              "alternateLabel": "Conf Champ",
              "detail": "Jan 26-Feb 1",
              "value": "3",
              "startDate": "2022-01-26T08:00Z",
              "endDate": "2022-02-02T07:59Z"
            },
            {
              "label": "Pro Bowl",
              "alternateLabel": "Pro Bowl",
              "detail": "Feb 2-8",
              "value": "4",
              "startDate": "2022-02-02T08:00Z",
              "endDate": "2022-02-09T07:59Z"
            },
            {
              "label": "Super Bowl",
              "alternateLabel": "Super Bowl",
              "detail": "Feb 9-15",
              "value": "5",
              "startDate": "2022-02-09T08:00Z",
              "endDate": "2022-02-16T07:59Z"
            }
          ]
        },
        {
          "label": "Off Season",
          "value": "4",
          "startDate": "2022-02-16T08:00Z",
          "endDate": "2022-08-01T06:59Z",
          "entries": [
            {
              "label": "Week 1",
              "alternateLabel": "Week 1",
              "detail": "Feb 16-Jul 31",
              "value": "1",
              "startDate": "2022-02-16T08:00Z",
              "endDate": "2022-08-01T06:59Z"
            }
          ]
        }
      ]
    }
  ],
  "season": {
    "type": 3,
    "year": 2021
  },
  "week": {
    "number": 4
  },
  "events": [
    {
      "id": "401326637",
      "uid": "s:20~l:28~e:401326637",
      "date": "2022-02-06T20:00Z",
      "name": "AFC  at NFC ",
      "shortName": "AFC @ NFC",
      "season": {
        "year": 2021,
        "type": 3,
        "slug": "post-season"
      },
      "competitions": [
        {
          "id": "401326637",
          "uid": "s:20~l:28~e:401326637~c:401326637",
          "date": "2022-02-06T20:00Z",
          "attendance": 0,
          "type": {
            "id": "4",
            "abbreviation": "ALLSTAR"
          },
          "timeValid": true,
          "neutralSite": true,
          "conferenceCompetition": false,
          "recent": false,
          "venue": {
            "id": "6501",
            "fullName": "Allegiant Stadium",
            "address": {
              "city": "Las Vegas",
              "state": "NV"
            },
            "capacity": 65000,
            "indoor": true
          },
          "competitors": [
            {
              "id": "32",
              "uid": "s:20~l:28~t:32",
              "type": "team",
              "order": 0,
              "homeAway": "home",
              "team": {
                "id": "32",
                "uid": "s:20~l:28~t:32",
                "location": "NFC",
                "abbreviation": "NFC",
                "displayName": "NFC",
                "shortDisplayName": "NFC",
                "isActive": false,
                "links": [
                  {
                    "rel": [
                      "scores",
                      "sportscenter",
                      "app",
                      "team"
                    ],
                    "href": "sportscenter://x-callback-url/showClubhouse?uid=s:20~l:28~t:32&section=scores",
                    "text": "Scores",
                    "isExternal": false,
                    "isPremium": false
                  },
                  {
                    "rel": [
                      "draftpicks",
                      "desktop",
                      "team"
                    ],
                    "href": "http://www.espn.com/nfl/draft/teams/_/name/nfc/nfc",
                    "text": "Draft Picks",
                    "isExternal": false,
                    "isPremium": true
                  },
                  {
                    "rel": [
                      "transactions",
                      "desktop",
                      "team"
                    ],
                    "href": "https://www.espn.com/nfl/team/transactions/_/name/nfc",
                    "text": "Transactions",
                    "isExternal": false,
                    "isPremium": false
                  },
                  {
                    "rel": [
                      "injuries",
                      "desktop",
                      "team"
                    ],
                    "href": "https://www.espn.com/nfl/team/injuries/_/name/nfc",
                    "text": "Injuries",
                    "isExternal": false,
                    "isPremium": false
                  },
                  {
                    "rel": [
                      "depthchart",
                      "desktop",
                      "team"
                    ],
                    "href": "https://www.espn.com/nfl/team/depth/_/name/nfc",
                    "text": "Depth Chart",
                    "isExternal": false,
                    "isPremium": false
                  }
                ],
                "logo": "https://a.espncdn.com/i/teamlogos/nfl/500/scoreboard/nfc.png"
              },
              "score": "0",
              "statistics": []
            },
            {
              "id": "31",
              "uid": "s:20~l:28~t:31",
              "type": "team",
              "order": 1,
              "homeAway": "away",
              "team": {
                "id": "31",
                "uid": "s:20~l:28~t:31",
                "location": "AFC",
                "abbreviation": "AFC",
                "displayName": "AFC",
                "shortDisplayName": "AFC",
                "isActive": false,
                "links": [
                  {
                    "rel": [
                      "scores",
                      "sportscenter",
                      "app",
                      "team"
                    ],
                    "href": "sportscenter://x-callback-url/showClubhouse?uid=s:20~l:28~t:31&section=scores",
                    "text": "Scores",
                    "isExternal": false,
                    "isPremium": false
                  },
                  {
                    "rel": [
                      "draftpicks",
                      "desktop",
                      "team"
                    ],
                    "href": "http://www.espn.com/nfl/draft/teams/_/name/afc/afc",
                    "text": "Draft Picks",
                    "isExternal": false,
                    "isPremium": true
                  },
                  {
                    "rel": [
                      "transactions",
                      "desktop",
                      "team"
                    ],
                    "href": "https://www.espn.com/nfl/team/transactions/_/name/afc",
                    "text": "Transactions",
                    "isExternal": false,
                    "isPremium": false
                  },
                  {
                    "rel": [
                      "injuries",
                      "desktop",
                      "team"
                    ],
                    "href": "https://www.espn.com/nfl/team/injuries/_/name/afc",
                    "text": "Injuries",
                    "isExternal": false,
                    "isPremium": false
                  },
                  {
                    "rel": [
                      "depthchart",
                      "desktop",
                      "team"
                    ],
                    "href": "https://www.espn.com/nfl/team/depth/_/name/afc",
                    "text": "Depth Chart",
                    "isExternal": false,
                    "isPremium": false
                  }
                ],
                "logo": "https://a.espncdn.com/i/teamlogos/nfl/500/scoreboard/afc.png"
              },
              "score": "0",
              "statistics": []
            }
          ],
          "notes": [
            {
              "type": "event",
              "headline": "Pro Bowl"
            }
          ],
          "status": {
            "clock": 0,
            "displayClock": "0:00",
            "period": 0,
            "type": {
              "id": "1",
              "name": "STATUS_SCHEDULED",
              "state": "pre",
              "completed": false,
              "description": "Scheduled",
              "detail": "Sun, February 6th at 3:00 PM EST",
              "shortDetail": "2/6 - 3:00 PM EST"
            }
          },
          "broadcasts": [
            {
              "market": "national",
              "names": [
                "ESPN",
                "ABC"
              ]
            }
          ],
          "format": {
            "regulation": {
              "periods": 4
            }
          },
          "tickets": [
            {
              "summary": "Tickets as low as $62",
              "numberAvailable": 3168,
              "links": [
                {
                  "href": "https://www.vividseats.com/nfl/nfl-pro-bowl-tickets/nfl-pro-bowl-2-6-3620846.html?wsUser=717"
                },
                {
                  "href": "https://www.vividseats.com/allegiant-stadium-tickets/venue/25873?wsUser=717"
                }
              ]
            }
          ],
          "startDate": "2022-02-06T20:00Z",
          "geoBroadcasts": [
            {
              "type": {
                "id": "1",
                "shortName": "TV"
              },
              "market": {
                "id": "1",
                "type": "National"
              },
              "media": {
                "shortName": "ESPN"
              },
              "lang": "en",
              "region": "us"
            },
            {
              "type": {
                "id": "1",
                "shortName": "TV"
              },
              "market": {
                "id": "1",
                "type": "National"
              },
              "media": {
                "shortName": "ABC"
              },
              "lang": "en",
              "region": "us"
            }
          ]
        }
      ],
      "links": [
        {
          "language": "en-US",
          "rel": [
            "summary",
            "desktop",
            "event"
          ],
          "href": "https://www.espn.com/nfl/game/_/gameId/401326637",
          "text": "Gamecast",
          "shortText": "Gamecast",
          "isExternal": false,
          "isPremium": false
        }
      ],
      "weather": {
        "displayValue": "Sunny",
        "temperature": 61,
        "highTemperature": 61,
        "conditionId": "1",
        "link": {
          "language": "en-US",
          "rel": [
            "89118"
          ],
          "href": "http://www.accuweather.com/en/us/allegiant-stadium-nv/89101/hourly-weather-forecast/209206_poi?day=4&hbhhour=12&lang=en-us",
          "text": "Weather",
          "shortText": "Weather",
          "isExternal": true,
          "isPremium": false
        }
      },
      "status": {
        "clock": 0,
        "displayClock": "0:00",
        "period": 0,
        "type": {
          "id": "1",
          "name": "STATUS_SCHEDULED",
          "state": "pre",
          "completed": false,
          "description": "Scheduled",
          "detail": "Sun, February 6th at 3:00 PM EST",
          "shortDetail": "2/6 - 3:00 PM EST"
        }
      }
    }
  ]
}

Created a pull request on @zacs repo with a fix for the Pro Bowl event (team/opponent records and colors were missing). Not really sure if what I put in is the ‘right’ way to go about things, but it at least allowed the AFC and NFC team acronyms to both create entities with a PRE state, so it “seems” to work ¯\(ツ)

/edit:
@D34DC3N73R, the card looks to be good as is, at least while in PRE state, not sure if it would hiccup because there’s no team record when we’re live though.

Thank you for the PR! Merged and will cut a release now.

1 Like

Thank you! Running the updated code on my dashboard now and everything seems to be working well with @D34DC3N73R 's nfl lovelace card after the first couple touchdowns and extra points, although I’m not seeing a win probability (and as expected the win/loss records aren’t there). Last play info and down distance are both present. Timeouts also showed up, and the blue & red colors ended up matching up pretty nicely to the logos(which I didn’t check at all, just googled a bit for AFC/NFC css colors lol ).

/Edit I haven’t been paying super close attention, but some time in the last 30 minutes or so the win prob did show up :slight_smile:

/edit to the edit: aaannddd the win-prob keeps disappearing. I’ve seen it pop up maybe twice, but only for a few moments each time. I know this is all down to the espn data simply being there or not, just reporting so anyone who might see this in the future knows not to count on it for this game.

This is great! Awesome job guys. I just implemented this and plan on using it during the Super Bowl.

I do have a question regarding the NFL Card. I am planning showing my NFL Card on my monitor for everyone at my home to see during the game. Is there a way for me to increase the size of the NFL Card?

I used card_mod to make some adjustments for a 10.1" screen running running a Home Assistant dashboard in a full screen Chromium browser. You may have to tweak the font-size and line-height amounts to your liking for your monitor. I found the scrolling last-play text distracting so I also disabled that and tweaked it so it grows to multiple lines if needed. Also note the dark color background in the screenshot is due to a custom theme(Noctis).

type: custom:nfl-card
entity: sensor.nfl_lar
card_mod:
  style:
    .: >
      ha-card { font-size: 2em; line-height:1.2em;}
      .last-play p {overflow: visible; white-space: normal;  display: block !important; padding-left: 0; animation: none !important; }

Thanks gonzotek. Just what I was looking for!

I am also looking into fullscreen-card and kiosk-mode to see how that works along with it.

So, I’m getting ready for the NFL season and noticed my card stopped working. It was showing the details for the first regular season game, but now it’s showing ‘Better Luck Next Year’ I’m not a programmer by any stretch, but I can follow along a bit. Did the source this was using change, or is there something bigger going on?

Thanks for the help!!

Nothing changed other than which games they show. There’s an issue on Github tracking this, but the issue is now that we’re “in season” only the current week’s game shows. In this case that means only Jax/Oak shows up in the feed.

Should be just fine after this week, but as far as the API is concerned, that’s the only game (and only teams) in existence.

1 Like

Happy Pre-Season everyone!
Just thought I’d check and see if anyone else is seeing issues with team colors?
The sensor doesn’t appear correct for me
image
49ers colors are listed as the same as the Packers colors

But in the json, they’re correct
image

1 Like

My fault, and thanks for catching & fixing and thanks @zacs for accepting @D34DC3N73R’s fix PR. I was in too much a hurry to get the afc/nfc game colors covered. Since I started playing with WLED a few weeks ago, I’d planned on using the colors for lighting effects during games the regular season, so this bug would have bitten me hard once pre-season ended. I’ll be too busy until then to add the lighting stuff to my nfl automations, but here’s a sneak peak of my dashboard will look on Sundays:


1 Like

Guys this is Awesome!! I have several cards built and working perfectly.

Here’s the thing I want to do…, there used to be an integration from NFL to IFTTT that I used to trigger my RGBWW lights to flash every time my team scored.

Does anyone have any automations that trigger on every score for a given team?

I’ve been working on a blueprint for mobile app notifications that I’m almost, but not quite, ready to share, and I have an automation & script combo for light flashing (I’m using a wled strip, and have it pull the team colors for a number of teams I’m following). The automation & script isn’t polished, but I’ll share as an example (you’ll definitely need to modify to suit your needs/specific setup).

automation:

alias: NFL WLED Team Colors
description: >-
  Watches for any NFL integration entity game score to change (or to enter 'POST'
  status) and changes 
trigger:
  - platform: event
    event_type: state_changed
condition:
  - condition: template
    value_template: >-
      {{ trigger.event.data.entity_id in integration_entities('nfl')

      and trigger.event.data.old_state is not none

      and trigger.event.data.new_state is not none and
      trigger.event.data.new_state.attributes.team_score is not none and
      trigger.event.data.old_state.attributes.team_score is not none and
      trigger.event.data.new_state.attributes.opponent_score is not none and
      trigger.event.data.old_state.attributes.opponent_score is not none

      and ( (trigger.event.data.new_state.attributes.team_score !=
      trigger.event.data.old_state.attributes.team_score) or
      (trigger.event.data.new_state.attributes.opponent_score !=
      trigger.event.data.old_state.attributes.opponent_score) or
      trigger.event.data.new_state == 'POST' )}}
action:
  - service: script.nfl_wled_color
    data:
      team: '{{ trigger.event.data.entity_id  }}'
      team_scored: >-
        {{ 'yes' if trigger.event.data.new_state.attributes.team_score >
        trigger.event.data.old_state.attributes.team_score else 'no' }}
mode: queued
max: 3

script:

alias: NFL WLED Color
fields:
  team:
    name: Team Sensor
    description: NFL Sensor
    example: sensor.nfl_phi
    required: true
    selector:
      entity:
        domain: sensor
        integration: nfl
  team_scored:
    name: Team Scored
    description: Set to true if the team scored, false if the opponent scored
    example: true
    default: true
    required: false
    selector:
      boolean:
variables:
  red: '{{ state_attr(team,''team_colors'')[1][1:3] |int(0,base=16)}}'
  green: '{{ state_attr(team,''team_colors'')[1][3:5] |int(0,base=16)}}'
  blue: '{{ state_attr(team,''team_colors'')[1][5:7] |int(0,base=16)}}'
  colors: '{{ "team_colors" if (team_scored == "yes") else "opponent_colors" }}'
sequence:
  - service: scene.create
    data:
      snapshot_entities: >-
        light.wled_2, select.wled_color_palette_2, number.wled_intensity_2,
        number.wled_speed_2
      scene_id: wled_capture
  - service: rest_command.screen_pi_wled_nfl_score
    data:
      team_primary: '{{ state_attr(team, colors)[0][1:7] }}'
      team_secondary: '{{ state_attr(team, colors)[1][1:7] }}'
  - delay:
      hours: 0
      minutes: 0
      seconds: 10
      milliseconds: 0
  - service: scene.turn_on
    target:
      entity_id: scene.wled_capture
    metadata: {}
mode: single
icon: mdi:palette

rest_command:

  screen_pi_wled_nfl_score:
    url: 'http://WLED_ADDRESS/win&A=192&SX=128&IX=128&FX=71&CL=H{{ team_primary }}&C2=H{{ team_secondary }}&C3=H000000&FP=3'

I’m not especially happy with the event trigger, it triggers on EVERY state change, but since my wife and a few friends all do survivor pools, it makes it easy for me swap teams in and out of HA every week and it just picks up every nfl integration sensor. The condition filters out a lot of the noise. The blueprint I’m developing won’t use event triggers, I’ve got it in a more polished state since I intended from the start to share it, but I want to finish up a few things and test it this weekend before making it available. The above was all built just for my own use.

4 Likes

Honestly it shouldn’t be that hard for me to add component-specific events (eg your team scored, opponent scored), I just have no time at the moment. I think it would just involve saving a prior state then comparing to current, and firing the event. Hopefully can get to it in a couple weeks.

5 Likes

That would be awesome!

So I finally am ready to share the notification blueprint, called NFL Game Score Notification.

Click the Import Blueprint button to add it to your Home Assistant:
Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

This will produce mobile app notifications on any score change (td, field goal, extra point), optionally excluding opponent scores. The notification will include data such as the quarter and game clock at the point the score was reported by the api, timeouts remaining, and win probability. It will also report the final score when the game ends. The notifications will be grouped together (separate from other HA notifications) and include metadata tags that allow the individual notifications to be replaced as new scores come in (in practice this works a little bit like Apple’s recently announced Live Activities, where you just see the latest information if you don’t swipe the notification away during a game).

You can track as many games and notify as many devices as you’d like, just select them in the automation.

I’m looking for some feedback on it before I create a post in the Blueprints exchange. One known issue, that I think is a Home Assistant bug (github frontend issue), is that if you remove a device in the UI, the automation doesn’t update (meaning the device isn’t actually removed from it). Until that is resolved, you’ll need to either edit the yaml to remove a device, or you could simply delete the automation and recreate from scratch since there aren’t many options.

Example notification on iOS 16 (note: not from a real game).
The dots after the scores are the remaining timeouts.

Example notification on an Apple Watch
Watch View

2 Likes

Does this work with android formatting options? You can do some extra things with Android… I did get it installed for the end of MNF and got the closing score. Wont be able to test again until TNF. Thanks for pulling this together!!

What kinds of things would you want? I’m not opposed to adding options, but I don’t have an Android device to test with. At the moment, the code as it is released is only using platform-agnostic features (namely groups and tags). Talking about improvements: I’m thinking I’d like to include a url field, so the notification could link to a specific Home Assistant dashboard view or an external website like the ESPN or NFL websites.

Does anyone have an automation (or preferably Nodered flow) for flashing lights (wled) when your team scores?

Also, what’s the possibility of having this functionality for NCAA Football??