Sports Standings and Scores

I looked, maybe there is one out there I do not know but it would be many calls like … get my league, get all players in that league, get stats about them. I would have hoped it was as easy as give me this weeks numbers.for my league.

What about espn’s api? I think its free to use. Too much of a pain?

http://espn-fantasy-football-api.s3-website.us-east-2.amazonaws.com/

For those NHL enthusiasts/fantasy players I should have this finished in a day or so. Need to figure out exactly how to scrape the data properly so it requires no manual intervention and just updates.

Also want to add some colors based on whether the team has more or less pts.

That said, this is Weekly strength of schedule showing who plays who all week and how many games they play. Fantasy owners would know the value here if the go to waivers they can pick up players that have more games per week (first column).

And by the way, this makes the sortable columns so valuable now, so glad they implemented it. You sort on the first column thigh to low to see target teams for free agents for the week. I will complete this with rating the matchups on pts and likely an overall rating.

Now enhanced with sorting, some coloring and home or away:

OK, so I finished most of the NHL Strength of Schedule so I thought I would post for those interested.

Requires:

HA multiscrape: GitHub - danieldotnl/ha-multiscrape: Home Assistant custom component for scraping (html, xml or json) multiple values (from a single HTTP request) with a separate sensor/attribute for each value. Support for (login) form-submit functionality.
(This is because this is the only way I could figure out how to scrape JSON content that is embedded in a web page into and attribute of a sensor)

The rest is the same, it is just a new tab in the view so all the decluttering, tab applies but you can cut it up how you like.

First, I use includes so in configuration.yaml I have:

multiscrape: !include multiscrape.yaml

Then in multiscrape.yaml, I have:

  - name: SOS scraper
    resource: https://www.dailyfaceoff.com/nhl-weekly-schedule
    scan_interval: 360000
    sensor:
      - unique_id: hockey_strength_of_schedule
        name: Hockey Strength of Schedule
        select: '#__NEXT_DATA__'
        value_template: '{{ now() }}'
        attributes:
          - name: props
            select: '#__NEXT_DATA__'
            value_template: >
                {{ value.replace("'", '"') }}

I set the scan_interval very high because you only need to scrape Monday mornings. You can do this in an automation. Next, I have a template sensor that takes the “string” of JSON and makes it into the attribute. In my included template.yaml. Note that this should be able to be done in one step in multiscrape but I could not figure it out. I have:

###
### Hockey Weekly Schedule
###
  - name: Hockey Weekly schedule
    unique_id: hockey_weekly_schedule
    state: "{{ now() }}"
    attributes:
        sos: "{{ (state_attr('sensor.hockey_strength_of_schedule','props') | from_json) }}"

So we would now have sensor.hockey_weekly_schedule which has an attribute “sos”:

Then it’s just a matter of presentation. The decluttering addition is:

  sos_settings:
    card:
      type: custom:flex-table-card
      title: '[[title]]'
      css:
        table+: 'padding: 0px; width: 2000px;'
        tbody tr td:first-child: 'width: 2px;'
        tbody tr:hover: 'background-color: green!important; color:white!important;'
      card_mod:
        style:
          .: |
            ha-card {
              overflow: auto;
              }
          $: |
            .card-header {
               padding-top: 6px!important;
               padding-bottom: 4px!important;
               font-size: 14px!important;
               line-height: 14px!important;
               font-weight: bold!important;
             }
      entities:
        include: '[[entity]]'
      sort_by: sos.props.pageProps.dataRows-
      columns:
        - name: SOS
          data: '[[attribute]]'
          modify: |-
            if (x[8] > 3 ){
                '<div style="display:none;">'+ x[8] + '</div>' + '<div style="background-color:lightgreen;text-align:center">' + x[8] + '</div>'; }
            else if (x[8] < 3) {
                '<div style="display:none;">'+ x[8] + '</div>' + '<div style="background-color:lightcoral;text-align:center"">' + x[8] + '</div>'; }
            else {
                '<div style="display:none;">'+ x[8] + '</div>' + '<div style=";text-align:center">' + x[8] +'</div>'}
        - name: Team
          data: '[[attribute]]'
          modify: >-
            '<div><img src="' + x[0].team.logo + '"
            style="height:20px;vertical-align:middle;">&nbsp;' + x[0].team.name
            + ' (' + x[0].team.wins + '-' + x[0].team.losses + '-' +
            x[0].team.overtimeLosses + ')</div>'
        - name: Monday
          data: '[[attribute]]'
          modify: >-
            if(x[1]){'<div><img src="' + x[1].team.logo + '"
            style="height:20px;vertical-align:middle;">&nbsp;' + (x[1].home ? ''
            : '@ ') + x[1].team.name + ' (' + x[1].team.wins + '-' +
            x[1].team.losses + '-' + x[1].team.overtimeLosses +
            ')</div>'}else{'<div style="text-align:center">---</div>'}
        - name: Tuesday
          data: '[[attribute]]'
          modify: >-
            if(x[2]){'<div><img src="' + x[2].team.logo + '"
            style="height:20px;vertical-align:middle;">&nbsp;' + (x[2].home ? ''
            : '@ ') + x[2].team.name + ' (' + x[2].team.wins + '-' +
            x[2].team.losses + '-' + x[2].team.overtimeLosses +
            ')</div>'}else{'<div style="text-align:center">---</div>'}
        - name: Wednesday
          data: '[[attribute]]'
          modify: >-
            if(x[3]){'<div><img src="' + x[3].team.logo + '"
            style="height:20px;vertical-align:middle;">&nbsp;' + (x[3].home ? ''
            : '@ ') + x[3].team.name + ' (' + x[3].team.wins + '-' +
            x[3].team.losses + '-' + x[3].team.overtimeLosses +
            ')</div>'}else{'<div style="text-align:center">---</div>'}
        - name: Thursday
          data: '[[attribute]]'
          modify: >-
            if(x[4]){'<div><img src="' + x[4].team.logo + '"
            style="height:20px;vertical-align:middle;">&nbsp;' + (x[4].home ? ''
            : '@ ') + x[4].team.name + ' (' + x[4].team.wins + '-' +
            x[4].team.losses + '-' + x[4].team.overtimeLosses +
            ')</div>'}else{'<div style="text-align:center">---</div>'}
        - name: Friday
          data: '[[attribute]]'
          modify: >-
            if(x[5]){'<div><img src="' + x[5].team.logo + '"
            style="height:20px;vertical-align:middle;">&nbsp;' + (x[5].home ? ''
            : '@ ') + x[5].team.name + ' (' + x[5].team.wins + '-' +
            x[5].team.losses + '-' + x[5].team.overtimeLosses +
            ')</div>'}else{'<div style="text-align:center">---</div>'}
        - name: Saturday
          data: '[[attribute]]'
          modify: >-
            if(x[6]){'<div><img src="' + x[6].team.logo + '"
            style="height:20px;vertical-align:middle;">&nbsp;' + (x[6].home ? ''
            : '@ ') + x[6].team.name + ' (' + x[6].team.wins + '-' +
            x[6].team.losses + '-' + x[6].team.overtimeLosses +
            ')</div>'}else{'<div style="text-align:center">---</div>'}
        - name: Sunday
          data: '[[attribute]]'
          modify: >-
            if(x[7]){'<div><img src="' + x[7].team.logo + '"
            style="height:20px;vertical-align:middle;">&nbsp;' + (x[7].home ? ''
            : '@ ') + x[7].team.name + ' (' + x[7].team.wins + '-' +
            x[7].team.losses + '-' + x[7].team.overtimeLosses +
            ')</div>'}else{'<div style="text-align:center">---</div>'}

And the tab view is:

                    - attributes:
                        label: SOS
                        icon: mdi:calendar-blank
                      card:
                        type: custom:decluttering-card
                        template: sos_settings
                        variables:
                          - title: NHL Strength of Schedule
                          - entity: sensor.hockey_weekly_schedule
                          - attribute: sos.props.pageProps.dataRows

And the result is:

Just add an automation to reload using multiscrape.reload service as you wish but in reality, the data I believe only changes weekly.

Next steps: Since wins and OTLs are in the numbers, maybe better to just show PTs instead of records and then use those PTs to color based on PTs difference between the teams.

@kbrown01 Thank you for all your hard work on this project! My primary setup is NHL. Are the “Pregame, Postgame and Live” tabs supposed to auto-populate? Or, are they intended to be used for favorite teams? And renamed, or removed, accordingly. All my sensors are working and visible in the other tabs.

Those are from the Teamtracker integration. I did not do live, in game stuff.

Just a note for all. The author of multiscrape provided me the next version and this version will fix an issue where you need both a multiscrape sensor and a template sensor. Everything can be handled by multiscrape now.

Updated code, no need for any template now but requires the latest version of multiscrape:

  - name: SOS scraper
    resource: https://www.dailyfaceoff.com/nhl-weekly-schedule
    scan_interval: 360000
    sensor:
      - unique_id: hockey_strength_of_schedule
        name: Hockey Strength of Schedule
        select: '#__NEXT_DATA__'
        value_template: '{{ now() }}'
        attributes:
          - name: sos
            select: '#__NEXT_DATA__'
            value_template: >
                {{ (value | from_json)['props']['pageProps'] }}

And the decluttering is:

  sos_settings:
    card:
      type: custom:flex-table-card
      title: '[[title]]'
      css:
        table+: 'padding: 0px; width: 2000px;'
        tbody tr td:first-child: 'width: 2px;'
        tbody tr:hover: 'background-color: green!important; color:white!important;'
      card_mod:
        style:
          .: |
            ha-card {
              overflow: auto;
              }
          $: |
            .card-header {
               padding-top: 6px!important;
               padding-bottom: 4px!important;
               font-size: 14px!important;
               line-height: 14px!important;
               font-weight: bold!important;
             }
      entities:
        include: '[[entity]]'
      sort_by: sos.dataRows-
      columns:
        - name: SOS
          data: '[[attribute]]'
          modify: |-
            if (x[8] > 3 ){
                '<div style="display:none;">'+ x[8] + '</div>' + '<div style="background-color:lightgreen;text-align:center">' + x[8] + '</div>'; }
            else if (x[8] < 3) {
                '<div style="display:none;">'+ x[8] + '</div>' + '<div style="background-color:lightcoral;text-align:center"">' + x[8] + '</div>'; }
            else {
                '<div style="display:none;">'+ x[8] + '</div>' + '<div style=";text-align:center">' + x[8] +'</div>'}
        - name: Team
          data: '[[attribute]]'
          modify: >-
            '<div><img src="' + x[0].team.logo + '"
            style="height:20px;vertical-align:middle;">&nbsp;' + x[0].team.name
            + ' (' + parseFloat(2*x[0].team.wins + x[0].team.overtimeLosses) +
            ')</div>'
        - name: Monday
          data: '[[attribute]]'
          modify: >-
            if(x[1]){'<div><img src="' + x[1].team.logo + '"
            style="height:20px;vertical-align:middle;">&nbsp;' + (x[1].home ? ''
            : '@ ') + x[1].team.name + ' (' + parseFloat(2*x[1].team.wins +
            x[1].team.overtimeLosses) + ')</div>'}else{'<div
            style="text-align:center">---</div>'}
        - name: Tuesday
          data: '[[attribute]]'
          modify: >-
            if(x[2]){'<div><img src="' + x[2].team.logo + '"
            style="height:20px;vertical-align:middle;">&nbsp;' + (x[2].home ? ''
            : '@ ') + x[2].team.name + ' (' + parseFloat(2*x[2].team.wins +
            x[2].team.overtimeLosses) + ')</div>'}else{'<div
            style="text-align:center">---</div>'}
        - name: Wednesday
          data: '[[attribute]]'
          modify: >-
            if(x[3]){'<div><img src="' + x[3].team.logo + '"
            style="height:20px;vertical-align:middle;">&nbsp;' + (x[3].home ? ''
            : '@ ') + x[3].team.name + ' (' + parseFloat(2*x[3].team.wins +
            x[3].team.overtimeLosses) + ')</div>'}else{'<div
            style="text-align:center">---</div>'}
        - name: Thursday
          data: '[[attribute]]'
          modify: >-
            if(x[4]){'<div><img src="' + x[4].team.logo + '"
            style="height:20px;vertical-align:middle;">&nbsp;' + (x[4].home ? ''
            : '@ ') + x[4].team.name + ' (' + parseFloat(2*x[4].team.wins +
            x[4].team.overtimeLosses) + ')</div>'}else{'<div
            style="text-align:center">---</div>'}
        - name: Friday
          data: '[[attribute]]'
          modify: >-
            if(x[5]){'<div><img src="' + x[5].team.logo + '"
            style="height:20px;vertical-align:middle;">&nbsp;' + (x[5].home ? ''
            : '@ ') + x[5].team.name + ' (' + parseFloat(2*x[5].team.wins +
            x[5].team.overtimeLosses) + ')</div>'}else{'<div
            style="text-align:center">---</div>'}
        - name: Saturday
          data: '[[attribute]]'
          modify: >-
            if(x[6]){'<div><img src="' + x[6].team.logo + '"
            style="height:20px;vertical-align:middle;">&nbsp;' + (x[6].home ? ''
            : '@ ') + x[6].team.name + ' (' + parseFloat(2*x[6].team.wins +
            x[6].team.overtimeLosses) + ')</div>'}else{'<div
            style="text-align:center">---</div>'}
        - name: Sunday
          data: '[[attribute]]'
          modify: >-
            if(x[7]){'<div><img src="' + x[7].team.logo + '"
            style="height:20px;vertical-align:middle;">&nbsp;' + (x[7].home ? ''
            : '@ ') + x[7].team.name + ' (' + parseFloat(2*x[7].team.wins +
            x[7].team.overtimeLosses) + ')</div>'}else{'<div
            style="text-align:center">---</div>'}

And the use is:

                    - attributes:
                        label: SOS
                        icon: mdi:calendar-blank
                      card:
                        type: custom:decluttering-card
                        template: sos_settings
                        variables:
                          - title: NHL Strength of Schedule
                          - entity: sensor.hockey_strength_of_schedule
                          - attribute: sos.dataRows

Thanks again for all your hard work! Happy holidays!!

Pre, Post, Live are all working now. A few posts above when you had an enduser remove the “Red Zone” test, I left one to many {%- endif -%} . Easy fix.

I am getting a few errors in my logs, that I can’t Figure out. It’s likely something that happened between having all sports, moving back to NHL only so on… The dashboard has been completely cleaned up and working as expected, albeit a bit slow on first landing. I’ve removed NFL, NBA and MLB from template.yaml and sensor.yaml. Multiscrape.yaml was updated with your code from last night. I’ve deleted scrape.yaml and its reference to no longer be included in config.yaml as I’m forgoing the goalie tab for now.

edit: I had a ton of sensors to remove and rebooted my box as opposed to just restarting HA.

The first error is a warning, but I’m noticing my memory usage creeping up. The second one is an error which I thought I resolved by removing the extra line above?

That is most certainly an error in your sensors, post the code for them. Or maybe you have not reloaded REST sensors or Templates after that change?

OK, taking a survey … while we do have professional sports … who if any are interested in gymnastics??? Do you have your kids/friends in meets?

I am working with the #1 sportsscore for gymnastics to create some dashboards.

Any one interested? If you let me know and we will take a look at what can be done.

Like this (names/teams obscured for here):

With regards to reloading REST Sensors or Templates. I honestly thought they reloaded on a full system boot? If not, can you point me towards the correct instruction? I read that REST couldn’t be reloaded, only a fresh boot.

sensor.yaml

##
## NHL Standings
##
- platform: rest
  scan_interval: 36000
  name: NHL Standings
  unique_id: sensor.nhl_standings
  resource: https://site.web.api.espn.com/apis/v2/sports/hockey/nhl/standings?seasontype=2&type=0&level=3
  value_template: "{{ now() }}"
  json_attributes:
      - children
##
## NHL Wildcard
##
- platform: rest
  scan_interval: 36000
  name: NHL Wildcard
  unique_id: sensor.nhl_wildcard
  resource: https://site.web.api.espn.com/apis/v2/sports/hockey/nhl/standings?region=us&lang=en&contentorigin=espn&type=3&level=2&sort=playoffseed%3Aasc%2Cpoints%3Adesc%2Cgamesplayed%3Aasc%2Crotwins%3Adesc&seasontype=2
  value_template: "{{ now() }}"
  json_attributes:
      - children
      - overall
##
## Starting Goaltender
##
- platform: rest
  name: nhl_starting_goalies
  unique_id: sensor.nhl_starting_goalies
  scan_interval: 3600
  resource_template: "https://www.dailyfaceoff.com/_next/data/{{states('sensor.starting_goalies_buildid')}}/starting-goalies.json"
  value_template: "{{ value_json.pageProps.date }}"
  json_attributes_path: "$.pageProps"
  json_attributes:
    - data
##

Template.yaml

sensor:

###
### NHL Divisions
###
  - name: NHL East Atlantic
    unique_id: sensor.nhl_east_atlantic
    state: "{{ now() }}"
    attributes:
      entries: "{{ state_attr('sensor.nhl_standings','children')[0]['children'][0]['standings']['entries'] }}"
  - name: NHL East Metropolitan
    unique_id: sensor.nhl_east_metropolitan
    state: "{{ now() }}"
    attributes:
      entries: "{{ state_attr('sensor.nhl_standings','children')[0]['children'][1]['standings']['entries'] }}"
  - name: NHL West Central
    unique_id: sensor.nhl_west_central
    state: "{{ now() }}"
    attributes:
      entries: "{{ state_attr('sensor.nhl_standings','children')[1]['children'][0]['standings']['entries'] }}"
  - name: NHL West Pacific
    unique_id: sensor.nhl_west_pacific
    state: "{{ now() }}"
    attributes:
      entries: "{{ state_attr('sensor.nhl_standings','children')[1]['children'][1]['standings']['entries'] }}"
###
### NHL Wildcard
###
  - name: NHL Wildcard Standings
    unique_id: sensor.nhl_wildcard_standings
    state: "{{ now() }}"
    attributes:
      east_atlantic_top: "{{ state_attr('sensor.nhl_wildcard','overall')[0]['children'][0]['standings']['entries'] }}"
      east_metropolitan_top: "{{ state_attr('sensor.nhl_wildcard','overall')[0]['children'][1]['standings']['entries'] }}"
      east_wildcard: "{{ state_attr('sensor.nhl_wildcard','children')[0]['standings']['entries'][:2] }}"
      east_hunt: >
          {% set hteams = namespace(hteam=[]) %}
          {% for team in state_attr('sensor.nhl_wildcard','children')[0]['standings']['entries'][2:] %}
            {% for stat in team['stats'] | selectattr('name','eq','clincher') %}
            {% else %}
                  {% set hteams.hteam = hteams.hteam + [team] %}
            {% endfor %}
          {% endfor %}
          {{ hteams.hteam }}
      east_eliminated: >
        {% set eteams = namespace(eteam=[]) %}
        {% for team in state_attr('sensor.nhl_wildcard','children')[0]['standings']['entries'][2:] %}
          {% for stat in team['stats'] %}
            {% if stat.name == 'clincher' %}
                {% set eteams.eteam = eteams.eteam + [team] %}
            {% endif %}
          {% endfor %}
        {% endfor %}
        {{ eteams.eteam }}
      west_central_top: "{{ state_attr('sensor.nhl_wildcard','overall')[1]['children'][0]['standings']['entries'] }}"
      west_pacific_top: "{{ state_attr('sensor.nhl_wildcard','overall')[1]['children'][1]['standings']['entries'] }}"
      west_wildcard: "{{ state_attr('sensor.nhl_wildcard','children')[1]['standings']['entries'][:2] }}"
      west_hunt: >
          {% set hteams = namespace(hteam=[]) %}
          {% for team in state_attr('sensor.nhl_wildcard','children')[1]['standings']['entries'][2:] %}
            {% for stat in team['stats'] | selectattr('name','eq','clincher') %}
            {% else %}
                  {% set hteams.hteam = hteams.hteam + [team] %}
            {% endfor %}
          {% endfor %}
          {{ hteams.hteam }}
      west_eliminated: >
        {% set eteams = namespace(eteam=[]) %}
        {% for team in state_attr('sensor.nhl_wildcard','children')[1]['standings']['entries'][2:] %}
          {% for stat in team['stats'] %}
            {% if stat.name == 'clincher' %}
                {% set eteams.eteam = eteams.eteam + [team] %}
            {% endif %}
          {% endfor %}
        {% endfor %}
        {{ eteams.eteam }}
##

You really have to post as code so we can see indenting. That will not work. As for reloading:

And also templates after REST if you have template changes.

Those are all my sensors. But the screen you are sending is the teamtracker ones which are from their integration.

my Dashboard:

decluttering_templates:
  nhl_settings:
    card:
      type: custom:flex-table-card
      title: '[[title]]'
      css:
        table+: 'padding: 0px; width: 1600px;'
        tbody tr td:first-child: 'width: 2%;'
        tbody tr td:nth-child(2): 'width: 20%;'
        tbody tr td:nth-child(n+3): 'width: 5%;'
        tbody tr:hover: 'background-color: green!important; color:white!important;'
        tbody tr td:nth-child(7): 'background-color: green; color: white;'
      card_mod:
        style:
          .: |
            ha-card {
              overflow: auto;
              }
          $: |
            .card-header {
               padding-top: 6px!important;
               padding-bottom: 4px!important;
               font-size: 14px!important;
               line-height: 14px!important;
               font-weight: bold!important;
             }
      entities:
        include: '[[entity]]'
        exclude: '[[excluded_entities]]'
      sort_by: entries-
      columns:
        - hidden: true
          data: '[[attribute]]'
          modify: '[[sort]]'
        - name: <div>C</div>
          data: '[[attribute]]'
          modify: >-
            if(typeof x.stats.find(y=>y.abbreviation == 'CLINCH') !==
            'undefined' ){x.stats.find(y=>y.abbreviation ==
            'CLINCH').displayValue}else{'-'}
        - name: Team
          data: '[[attribute]]'
          modify: >-
            '<div><a href="' + x.team.links[0].href + '" target="_blank"><img
            src="' + x.team.logos[0].href + '" style="height:
            20px;vertical-align:middle;"></a>&nbsp;' + x.team.displayName +
            '</div>'
        - name: <div>GP</div>
          data: '[[attribute]]'
          modify: x.stats.find(y=>y.abbreviation == 'GP').displayValue
        - name: <div>W</div>
          data: '[[attribute]]'
          modify: x.stats.find(y=>y.abbreviation == 'W').displayValue
        - name: <div>L</div>
          data: '[[attribute]]'
          modify: x.stats.find(y=>y.abbreviation == 'L').displayValue
        - name: <div>OTL</div>
          data: '[[attribute]]'
          modify: x.stats.find(y=>y.abbreviation == 'OTL').displayValue
        - name: <div>PTS</div>
          data: '[[attribute]]'
          modify: x.stats.find(y=>y.abbreviation == 'PTS').displayValue
        - name: <div>RW</div>
          data: '[[attribute]]'
          modify: x.stats.find(y=>y.abbreviation == 'RW').displayValue
        - name: <div>ROW</div>
          data: '[[attribute]]'
          modify: x.stats.find(y=>y.abbreviation == 'ROW').displayValue
        - name: <div>SOW</div>
          data: '[[attribute]]'
          modify: x.stats.find(y=>y.abbreviation == 'SOW').displayValue
        - name: <div>SOL</div>
          data: '[[attribute]]'
          modify: x.stats.find(y=>y.abbreviation == 'SOL').displayValue
        - name: <div>HOME</div>
          data: '[[attribute]]'
          modify: x.stats.find(y=>y.abbreviation == 'HOME').displayValue
        - name: <div>AWAY</div>
          data: '[[attribute]]'
          modify: x.stats.find(y=>y.abbreviation == 'AWAY').displayValue
        - name: <div>GF</div>
          data: '[[attribute]]'
          modify: x.stats.find(y=>y.abbreviation == 'GF').displayValue
        - name: <div>GA</div>
          data: '[[attribute]]'
          modify: x.stats.find(y=>y.abbreviation == 'GA').displayValue
        - name: <div>DIFF</div>
          data: '[[attribute]]'
          modify: x.stats.find(y=>y.abbreviation == 'DIFF').displayValue
        - name: <div>L10</div>
          data: '[[attribute]]'
          modify: x.stats.find(y=>y.abbreviation == 'L10').summary
        - name: <div>STRK</div>
          data: '[[attribute]]'
          modify: x.stats.find(y=>y.abbreviation == 'STRK').displayValue
  game_stats:
    card:
      type: custom:auto-entities
      unique: true
      show_empty: false
      card:
        type: custom:layout-card
        layout_type: masonry
        width: 200px
        max-columns: 5
      card_param: cards
      filter:
        template: |
          {%- for team in integration_entities("teamtracker") -%}
            {%- if state_attr(team, "league") == "[[sport]]" -%}
            {%- if states(team) == "[[status]]" -%}
            {%- if state_attr(team, "team_homeaway") == "home" -%}
              {{{"type": "custom:teamtracker-card",
                "entity": team, 
                "home_side": "right"}}},
            {%- endif -%}
            {%- endif -%}
            {%- endif -%}
          {%- endfor -%}
        exclude:
          - entity_id: '*team_tracker*'
      sort:
        method: attribute
        attribute: date
  sos_settings:
    card:
      type: custom:flex-table-card
      title: '[[title]]'
      css:
        table+: 'padding: 0px; width: 2000px;'
        tbody tr td:first-child: 'width: 2px;'
        tbody tr:hover: 'background-color: green!important; color:white!important;'
      card_mod:
        style:
          .: |
            ha-card {
              overflow: auto;
              }
          $: |
            .card-header {
               padding-top: 6px!important;
               padding-bottom: 4px!important;
               font-size: 14px!important;
               line-height: 14px!important;
               font-weight: bold!important;
             }
      entities:
        include: '[[entity]]'
      sort_by: sos.dataRows-
      columns:
        - name: SOS
          data: '[[attribute]]'
          modify: |-
            if (x[8] > 3 ){
                '<div style="display:none;">'+ x[8] + '</div>' + '<div style="background-color:lightgreen;text-align:center">' + x[8] + '</div>'; }
            else if (x[8] < 3) {
                '<div style="display:none;">'+ x[8] + '</div>' + '<div style="background-color:lightcoral;text-align:center"">' + x[8] + '</div>'; }
            else {
                '<div style="display:none;">'+ x[8] + '</div>' + '<div style=";text-align:center">' + x[8] +'</div>'}
        - name: Team
          data: '[[attribute]]'
          modify: >-
            '<div><img src="' + x[0].team.logo + '"
            style="height:20px;vertical-align:middle;">&nbsp;' + x[0].team.name
            + ' (' + parseFloat(2*x[0].team.wins + x[0].team.overtimeLosses) +
            ')</div>'
        - name: Monday
          data: '[[attribute]]'
          modify: >-
            if(x[1]){'<div><img src="' + x[1].team.logo + '"
            style="height:20px;vertical-align:middle;">&nbsp;' + (x[1].home ? ''
            : '@ ') + x[1].team.name + ' (' + parseFloat(2*x[1].team.wins +
            x[1].team.overtimeLosses) + ')</div>'}else{'<div
            style="text-align:center">---</div>'}
        - name: Tuesday
          data: '[[attribute]]'
          modify: >-
            if(x[2]){'<div><img src="' + x[2].team.logo + '"
            style="height:20px;vertical-align:middle;">&nbsp;' + (x[2].home ? ''
            : '@ ') + x[2].team.name + ' (' + parseFloat(2*x[2].team.wins +
            x[2].team.overtimeLosses) + ')</div>'}else{'<div
            style="text-align:center">---</div>'}
        - name: Wednesday
          data: '[[attribute]]'
          modify: >-
            if(x[3]){'<div><img src="' + x[3].team.logo + '"
            style="height:20px;vertical-align:middle;">&nbsp;' + (x[3].home ? ''
            : '@ ') + x[3].team.name + ' (' + parseFloat(2*x[3].team.wins +
            x[3].team.overtimeLosses) + ')</div>'}else{'<div
            style="text-align:center">---</div>'}
        - name: Thursday
          data: '[[attribute]]'
          modify: >-
            if(x[4]){'<div><img src="' + x[4].team.logo + '"
            style="height:20px;vertical-align:middle;">&nbsp;' + (x[4].home ? ''
            : '@ ') + x[4].team.name + ' (' + parseFloat(2*x[4].team.wins +
            x[4].team.overtimeLosses) + ')</div>'}else{'<div
            style="text-align:center">---</div>'}
        - name: Friday
          data: '[[attribute]]'
          modify: >-
            if(x[5]){'<div><img src="' + x[5].team.logo + '"
            style="height:20px;vertical-align:middle;">&nbsp;' + (x[5].home ? ''
            : '@ ') + x[5].team.name + ' (' + parseFloat(2*x[5].team.wins +
            x[5].team.overtimeLosses) + ')</div>'}else{'<div
            style="text-align:center">---</div>'}
        - name: Saturday
          data: '[[attribute]]'
          modify: >-
            if(x[6]){'<div><img src="' + x[6].team.logo + '"
            style="height:20px;vertical-align:middle;">&nbsp;' + (x[6].home ? ''
            : '@ ') + x[6].team.name + ' (' + parseFloat(2*x[6].team.wins +
            x[6].team.overtimeLosses) + ')</div>'}else{'<div
            style="text-align:center">---</div>'}
        - name: Sunday
          data: '[[attribute]]'
          modify: >-
            if(x[7]){'<div><img src="' + x[7].team.logo + '"
            style="height:20px;vertical-align:middle;">&nbsp;' + (x[7].home ? ''
            : '@ ') + x[7].team.name + ' (' + parseFloat(2*x[7].team.wins +
            x[7].team.overtimeLosses) + ')</div>'}else{'<div
            style="text-align:center">---</div>'}
views:
  - theme: Backend-selected
    title: Sports
    type: panel
    icon: mdi:strategy
    badges: []
    cards:
      - type: custom:mod-card
        card_mod:
          style:
            tabbed-card $: |
              mwc-tab {
                background: var(--ha-card-background, var(--card-background-color, white) );
                border-color: var(--ha-card-border-color, var(--divider-color, #e0e0e0) );
                border-width: 2px;
                border-top-left-radius: 20px;
                border-top-right-radius: 20px;
                border-style: solid;
                overflow: hidden;
                width: 25%;
              }
              mwc-tab[active] {
                background: #EBFFD8 !important;
              }
        card:
          type: custom:tabbed-card
          styles:
            '--mdc-theme-primary': green
            '--mdc-tab-text-label-color-default': silver
            '--mdc-typography-button-font-size': 12px
          tabs:
            - attributes:
                label: NHL
                icon: mdi:hockey-puck
              card:
                type: custom:mod-card
                card_mod:
                  style:
                    tabbed-card $: |
                      mwc-tab {
                        background: var(--ha-card-background, var(--card-background-color, white) );
                        border-color: var(--ha-card-border-color, var(--divider-color, #e0e0e0) );
                        border-width: 2px;
                        border-top-left-radius: 20px;
                        border-top-right-radius: 20px;
                        border-style: solid;
                        overflow: hidden;
                        width: 20%;
                      }
                      mwc-tab[active] {
                        background: #EBFFD8 !important;
                      }
                card:
                  type: custom:tabbed-card
                  styles:
                    '--mdc-theme-primary': green
                    '--mdc-tab-text-label-color-default': silver
                    '--mdc-typography-button-font-size': 12px
                  tabs:
                    - attributes:
                        label: Standings
                        icon: mdi:ballot
                      card:
                        type: custom:mod-card
                        card_mod:
                          style:
                            tabbed-card $: |
                              mwc-tab {
                                background: var(--ha-card-background, var(--card-background-color, white) );
                                border-color: var(--ha-card-border-color, var(--divider-color, #e0e0e0) );
                                border-width: 2px;
                                border-top-left-radius: 20px;
                                border-top-right-radius: 20px;
                                border-style: solid;
                                overflow: hidden;
                                width: 25%;
                              }
                              mwc-tab[active] {
                                background: #EBFFD8 !important;
                              }
                        card:
                          type: custom:tabbed-card
                          styles:
                            '--mdc-theme-primary': green
                            '--mdc-tab-text-label-color-default': silver
                            '--mdc-typography-button-font-size': 12px
                          tabs:
                            - attributes:
                                label: Divisional
                              card:
                                type: custom:stack-in-card
                                mode: vertical
                                cards:
                                  - type: custom:decluttering-card
                                    template: nhl_settings
                                    variables:
                                      - title: Eastern Atlantic
                                      - entity: sensor.nhl_east_atlantic
                                      - attribute: entries
                                      - excluded_entities:
                                          - sensor.nhl_starting_s
                                          - sensor.nhl_wildcard
                                          - sensor.nhl_wildcard_standings
                                      - sort: >-
                                          x.stats.find(y=>y.shortDisplayName ==
                                          'PTS').value
                                  - type: custom:decluttering-card
                                    template: nhl_settings
                                    variables:
                                      - title: Eastern Metropolitan
                                      - entity: sensor.nhl_east_metropolitan
                                      - attribute: entries
                                      - sort: >-
                                          x.stats.find(y=>y.shortDisplayName ==
                                          'PTS').value
                                      - excluded_entities:
                                          - sensor.nhl_starting_goalies
                                          - sensor.nhl_wildcard
                                          - sensor.nhl_wildcard_standings
                                  - type: custom:decluttering-card
                                    template: nhl_settings
                                    variables:
                                      - title: West Central
                                      - entity: sensor.nhl_west_central
                                      - attribute: entries
                                      - sort: >-
                                          x.stats.find(y=>y.shortDisplayName ==
                                          'PTS').value
                                      - excluded_entities:
                                          - sensor.nhl_starting_s
                                          - sensor.nhl_wildcard
                                          - sensor.nhl_wildcard_standings
                                  - type: custom:decluttering-card
                                    template: nhl_settings
                                    variables:
                                      - title: West Pacific
                                      - entity: sensor.nhl_west_pacific
                                      - attribute: entries
                                      - excluded_entities:
                                          - sensor.nhl_starting_goalies
                                          - sensor.nhl_wildcard
                                          - sensor.nhl_wildcard_standings
                                      - sort: >-
                                          x.stats.find(y=>y.shortDisplayName ==
                                          'PTS').value
                                      - excluded_entities:
                                          - sensor.nhl_starting_s
                                          - sensor.nhl_wildcard
                                          - sensor.nhl_wildcard_standings
                            - attributes:
                                label: Conference
                              card:
                                type: custom:stack-in-card
                                mode: vertical
                                cards:
                                  - type: custom:decluttering-card
                                    template: nhl_settings
                                    variables:
                                      - title: Eastern
                                      - entity: sensor.nhl_east_*
                                      - attribute: entries
                                      - excluded_entities:
                                          - sensor.nhl_starting_goalies
                                          - sensor.nhl_wildcard
                                          - sensor.nhl_wildcard_standings
                                      - sort: >-
                                          x.stats.find(y=>y.shortDisplayName ==
                                          'PTS').value
                                  - type: custom:decluttering-card
                                    template: nhl_settings
                                    variables:
                                      - title: Western
                                      - entity: sensor.nhl_west_*
                                      - attribute: entries
                                      - sort: >-
                                          x.stats.find(y=>y.shortDisplayName ==
                                          'PTS').value
                                      - excluded_entities:
                                          - sensor.nhl_starting_goalies
                                          - sensor.nhl_wildcard
                                          - sensor.nhl_wildcard_standings
                            - attributes:
                                label: Overall
                              card:
                                type: custom:decluttering-card
                                template: nhl_settings
                                variables:
                                  - title: Overall
                                  - entity: sensor.nhl_*_*
                                  - attribute: entries
                                  - excluded_entities:
                                      - sensor.nhl_starting_goalies
                                      - sensor.nhl_wildcard
                                      - sensor.nhl_wildcard_standings
                                  - sort: >-
                                      x.stats.find(y=>y.shortDisplayName ==
                                      'PTS').value
                            - attributes:
                                label: Wildcard
                              card:
                                type: custom:stack-in-card
                                mode: vertical
                                cards:
                                  - type: markdown
                                    content: |
                                      <h2>Eastern Conference</h2>
                                  - type: custom:decluttering-card
                                    template: nhl_settings
                                    variables:
                                      - title: Atlantic Leaders
                                      - entity: sensor.nhl_wildcard_standings
                                      - attribute: east_atlantic_top
                                      - excluded_entities:
                                          - sensor.nhl_starting_goalies
                                      - sort: >-
                                          x.stats.find(y=>y.shortDisplayName ==
                                          'PTS').value
                                  - type: custom:decluttering-card
                                    template: nhl_settings
                                    variables:
                                      - title: Metropolitan Leaders
                                      - entity: sensor.nhl_wildcard_standings
                                      - attribute: east_metropolitan_top
                                      - excluded_entities:
                                          - sensor.nhl_starting_goalies
                                      - sort: >-
                                          x.stats.find(y=>y.shortDisplayName ==
                                          'PTS').value
                                  - type: custom:decluttering-card
                                    template: nhl_settings
                                    variables:
                                      - title: Wildcards
                                      - entity: sensor.nhl_wildcard_standings
                                      - attribute: east_wildcard
                                      - excluded_entities:
                                          - sensor.nhl_starting_goalies
                                      - sort: >-
                                          x.stats.find(y=>y.shortDisplayName ==
                                          'PTS').value
                                  - type: custom:decluttering-card
                                    template: nhl_settings
                                    variables:
                                      - title: In The Hunt
                                      - entity: sensor.nhl_wildcard_standings
                                      - attribute: east_hunt
                                      - excluded_entities:
                                          - sensor.nhl_starting_goalies
                                      - sort: >-
                                          x.stats.find(y=>y.shortDisplayName ==
                                          'PTS').value
                                  - type: custom:decluttering-card
                                    template: nhl_settings
                                    variables:
                                      - title: Eliminated
                                      - entity: sensor.nhl_wildcard_standings
                                      - attribute: east_eliminated
                                      - excluded_entities:
                                          - sensor.nhl_starting_goalies
                                      - sort: >-
                                          x.stats.find(y=>y.shortDisplayName ==
                                          'PTS').value
                                  - type: markdown
                                    content: |
                                      <h2>Western Conference</h2>
                                  - type: custom:decluttering-card
                                    template: nhl_settings
                                    variables:
                                      - title: Central Leaders
                                      - entity: sensor.nhl_wildcard_standings
                                      - attribute: west_central_top
                                      - excluded_entities:
                                          - sensor.nhl_starting_goalies
                                      - sort: >-
                                          x.stats.find(y=>y.shortDisplayName ==
                                          'PTS').value
                                  - type: custom:decluttering-card
                                    template: nhl_settings
                                    variables:
                                      - title: Pacific Leaders
                                      - entity: sensor.nhl_wildcard_standings
                                      - attribute: west_pacific_top
                                      - excluded_entities:
                                          - sensor.nhl_starting_goalies
                                      - sort: >-
                                          x.stats.find(y=>y.shortDisplayName ==
                                          'PTS').value
                                  - type: custom:decluttering-card
                                    template: nhl_settings
                                    variables:
                                      - title: Wildcards
                                      - entity: sensor.nhl_wildcard_standings
                                      - attribute: west_wildcard
                                      - excluded_entities:
                                          - sensor.nhl_starting_goalies
                                      - sort: >-
                                          x.stats.find(y=>y.shortDisplayName ==
                                          'PTS').value
                                  - type: custom:decluttering-card
                                    template: nhl_settings
                                    variables:
                                      - title: In The Hunt
                                      - entity: sensor.nhl_wildcard_standings
                                      - attribute: west_hunt
                                      - excluded_entities:
                                          - sensor.nhl_starting_goalies
                                      - sort: >-
                                          x.stats.find(y=>y.shortDisplayName ==
                                          'PTS').value
                                  - type: custom:decluttering-card
                                    template: nhl_settings
                                    variables:
                                      - title: Eliminated
                                      - entity: sensor.nhl_wildcard_standings
                                      - attribute: west_eliminated
                                      - excluded_entities:
                                          - sensor.nhl_starting_goalies
                                      - sort: >-
                                          x.stats.find(y=>y.shortDisplayName ==
                                          'PTS').value
                    - attributes:
                        label: Schedule
                        icon: mdi:calendar-blank
                      card:
                        type: custom:decluttering-card
                        template: sos_settings
                        variables:
                          - title: NHL Strength of Schedule
                          - entity: sensor.hockey_strength_of_schedule
                          - attribute: sos.dataRows
                    - attributes:
                        label: Pregame
                        icon: mdi:blood-bag
                      card:
                        type: custom:decluttering-card
                        template: game_stats
                        variables:
                          - sport: NHL
                          - status: PRE
                    - attributes:
                        label: Live
                        icon: mdi:hockey-puck
                      card:
                        type: custom:decluttering-card
                        template: game_stats
                        variables:
                          - sport: NHL
                          - status: IN
                    - attributes:
                        label: Postgame
                        icon: mdi:hockey-sticks
                      card:
                        type: custom:decluttering-card
                        template: game_stats
                        variables:
                          - sport: NHL
                          - status: POST
title: Sports Standings and Scores

Do you have that sensor? It is a scrape sensor … I use includes so in configuration.yaml:

scrape: !include scrape.yaml

And in scrape.yaml:

  - resource: https://www.dailyfaceoff.com/starting-goalies
    sensor:
      - name: Starting Goalie BuildID
        unique_id: sensor.starting_goalie_buildid
        select: '#__NEXT_DATA__'
        value_template: >
            {{ value | regex_findall('buildId":\s?"([a-zA-Z0-9_-]{1,99})"') | first }}

I did in the beginning, but I removed it after running into an issue with multiple sensors ending in_X . Your code was the only thing I had in scrape so it is no longer included in configuration.yaml either.

WRT to the starting goalie sensors. They are all deleted now. This includes the _buildid sensor.

I will add that tab and other sports once I know what’s causing my current challenge.

What exactly again is the current challenge? I don;t see the errors posted above. If it is only standings then does sensor.nhl_standings show the state in developer’s tools?

sensor.nhl_standings is truncated below due character restriction for this post.

The errors:

Logger: homeassistant.components.recorder.db_schema
Source: components/recorder/db_schema.py:582
Integration: Recorder (documentation, issues)
First occurred: 4:36:00 PM (45 occurrences)
Last logged: 4:44:00 PM

State attributes for sensor.nhl_east_metropolitan exceed maximum size of 16384 bytes. This can cause database performance issues; Attributes will not be stored
State attributes for sensor.nhl_east_atlantic exceed maximum size of 16384 bytes. This can cause database performance issues; Attributes will not be stored
State attributes for sensor.nhl_wildcard_standings exceed maximum size of 16384 bytes. This can cause database performance issues; Attributes will not be stored
State attributes for sensor.nhl_west_central exceed maximum size of 16384 bytes. This can cause database performance issues; Attributes will not be stored
State attributes for sensor.nhl_west_pacific exceed maximum size of 16384 bytes. This can cause database performance issues; Attributes will not be stored

and

Logger: homeassistant.helpers.event
Source: helpers/template.py:515
First occurred: 5:00:15 PM (1 occurrences)
Last logged: 5:00:15 PM

Error while processing template: Template<template=({%- for team in integration_entities(“teamtracker”) -%} {%- if state_attr(team, “league”) == “NHL” -%} {%- if states(team) == “[[status]]” -%} {%- if state_attr(team, “team_homeaway”) == “home” -%} {{{“type”: “custom:teamtracker-card”, “entity”: team, “home_side”: “right”}}}, {%- endif -%} {%- endif -%} {%- endif -%} {%- endif -%} {%- endfor -%}) renders=2>
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/template.py”, line 513, in ensure_valid
self._compiled_code = self._env.compile(self.template)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/template.py”, line 2663, in compile
cached = self.template_cache[source] = super().compile(source)
^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/jinja2/environment.py”, line 768, in compile
self.handle_exception(source=source_hint)
File “/usr/local/lib/python3.11/site-packages/jinja2/environment.py”, line 936, in handle_exception
raise rewrite_traceback_stack(source=source)
File “”, line 11, in template
jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag ‘endif’. Jinja was looking for the following tags: ‘endfor’ or ‘else’. The innermost block that needs to be closed is ‘for’.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/template.py”, line 695, in async_render_to_info
render_info._result = self.async_render(
^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/template.py”, line 563, in async_render
compiled = self._compiled or self._ensure_compiled(limited, strict, log_fn)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/template.py”, line 766, in _ensure_compiled
self.ensure_valid()
File “/usr/src/homeassistant/homeassistant/helpers/template.py”, line 515, in ensure_valid
raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: TemplateSyntaxError: Encountered unknown tag ‘endif’. Jinja was looking for the following tags: ‘endfor’ or ‘else’. The innermost block that needs to be closed is ‘for’.

children:
  - uid: s:70~l:90~g:7
    id: "7"
    name: Eastern Conference
    abbreviation: East
    children:
      - uid: s:70~l:90~g:32
        id: "32"
        name: Atlantic Division
        abbreviation: ATL
        standings:
          id: "0"
          name: overall
          displayName: Overall Standings
          links:
            - language: en-US
              rel:
                - standings
                - desktop
              href: https://www.espn.com/nhl/standings/_/group/32
              text: Table
              shortText: Standings
              isExternal: false
              isPremium: false
          season: 2024
          seasonType: 2
          seasonDisplayName: 2023-24
          entries:
            - team:
                id: "1"
                uid: s:70~l:90~t:1
                location: Boston
                name: Bruins
                abbreviation: BOS
                displayName: Boston Bruins
                shortDisplayName: Bruins
                isActive: true
                logos:
                  - href: >-
                      https://a.espncdn.com/i/teamlogos/nhl/500/scoreboard/bos.png
                    width: 500
                    height: 500
                    alt: ""
                    rel:
                      - full
                      - scoreboard
                    lastUpdated: 2023-10-05T19:48Z
                  - href: >-
                      https://a.espncdn.com/i/teamlogos/nhl/500-dark/scoreboard/bos.png
                    width: 500
                    height: 500
                    alt: ""
                    rel:
                      - full
                      - scoreboard
                      - dark
                    lastUpdated: 2023-10-05T19:49Z
                links:
                  - language: en-US
                    rel:
                      - clubhouse
                      - desktop
                      - team
                    href: http://www.espn.com/nhl/team/_/name/bos/boston-bruins
                    text: Clubhouse
                    shortText: Clubhouse
                    isExternal: false
                    isPremium: false
                  - language: en-US
                    rel:
                      - clubhouse
                      - mobile
                      - team
                    href: http://m.espn.com/nhl/clubhouse?teamId=1
                    text: Clubhouse
                    shortText: Clubhouse
                    isExternal: false
                    isPremium: false
              stats:
                - name: otLosses
                  displayName: Overtime Losses
                  shortDisplayName: OTL
                  description: Number of Overtime Losses
                  abbreviation: OTL
                  type: otlosses
                  value: 6
                  displayValue: "6"
                - name: differential
                  displayName: Average Point Differential
                  shortDisplayName: DIFF
                  description: Average Point Differential
                  abbreviation: DIFF
                  type: differential
                  value: 0.6000000000000001
                  displayValue: "+0.6"
                - name: gamesBehind
                  displayName: Games Back
                  shortDisplayName: GB
                  description: Games Back
                  abbreviation: GB
                  type: gamesbehind
                  value: 0
                  displayValue: "-"
                - name: gamesPlayed
                  displayName: Games Played
                  shortDisplayName: GP
                  description: Games Played
                  abbreviation: GP
                  type: gamesplayed
                  value: 31
                  displayValue: "31"
                - name: losses
                  displayName: Losses
                  shortDisplayName: L
                  description: Losses
                  abbreviation: L
                  type: losses
                  value: 6
                  displayValue: "6"
                - name: playoffSeed
                  displayName: Position
                  shortDisplayName: POS
                  description: Playoff Seed
                  abbreviation: SEED
                  type: playoffseed
                  value: 2
                  displayValue: "2"
                - name: pointDifferential
                  displayName: Point Differential
                  shortDisplayName: DIFF
                  description: Point Differential
                  abbreviation: DIFF
                  type: pointdifferential
                  value: 16
                  displayValue: "+16"
                - name: points
                  displayName: Points
                  shortDisplayName: PTS
                  description: Total Points
                  abbreviation: PTS
                  type: points
                  value: 44
                  displayValue: "44"
                - name: pointsAgainst
                  displayName: Goals Against
                  shortDisplayName: GA
                  description: Goals Against
                  abbreviation: GA
                  type: pointsagainst
                  value: 82
                  displayValue: "82"
                - name: pointsFor
                  displayName: Goals For
                  shortDisplayName: GF
                  description: Goals For
                  abbreviation: GF
                  type: pointsfor
                  value: 98
                  displayValue: "98"
                - name: streak
                  displayName: Streak
                  shortDisplayName: STRK
                  description: Current Streak
                  abbreviation: STRK
                  type: streak
                  value: -3
                  displayValue: L3
                - name: wins
                  displayName: Wins
                  shortDisplayName: W
                  description: Wins
                  abbreviation: W
                  type: wins
                  value: 19
                  displayValue: "19"
                - name: overtimeLosses
                  displayName: Overtime Losses
                  shortDisplayName: OT Losses
                  description: Number of Overtime Losses
                  abbreviation: OTL
                  type: overtimelosses
                  value: 6
                  displayValue: "6"
                - name: overtimeWins
                  displayName: Overtime Wins
                  shortDisplayName: OTW Wins
                  description: Number Overtime Wins
                  abbreviation: OTW
                  type: overtimewins
                  value: 4
                  displayValue: "4"
                - name: pointsDiff
                  displayName: Goal Differential
                  shortDisplayName: DIFF
                  description: Goal Differential
                  abbreviation: DIFF
                  type: pointsdiff
                  value: 16
                  displayValue: "+16"
                - name: regWins
                  displayName: Regulation Wins
                  shortDisplayName: RW
                  description: Number of Regulation Wins
                  abbreviation: RW
                  type: regwins
                  value: 15
                  displayValue: "15"
                - name: rotWins
                  displayName: Regulation and Overtime Wins
                  shortDisplayName: ROW Wins
                  description: Number of Regulation and Overtime Wins
                  abbreviation: ROW
                  type: rotwins
                  value: 17
                  displayValue: "17"
                - name: shootoutLosses
                  displayName: Shootout Losses
                  shortDisplayName: SOL
                  description: Shootout Losses
                  abbreviation: SOL
                  type: shootoutlosses
                  value: 0
                  displayValue: "0"
                - name: shootoutWins
                  displayName: Shootout Wins
                  shortDisplayName: SOW
                  description: Shootout Wins
                  abbreviation: SOW
                  type: shootoutwins
                  value: 2
                  displayValue: "2"
                - id: "0"
                  name: overall
                  abbreviation: TOTAL
                  displayName: Team Season Record
                  shortDisplayName: Season
                  description: Overall Record
                  type: total
                  summary: 19-6-6
                  displayValue: 19-6-6, 44 PTS
                - id: "2"
                  name: Home
                  abbreviation: HOME
                  displayName: Home
                  shortDisplayName: HOME
                  description: Home Record
                  type: home
                  summary: 10-2-3
                  displayValue: 10-2-3
                - id: "3"
                  name: Road
                  abbreviation: AWAY
                  displayName: Away
                  shortDisplayName: AWAY
                  description: Away Record
                  type: road
                  summary: 9-4-3
                  displayValue: 9-4-3
                - id: "5"
                  name: Last Ten Games
                  abbreviation: L10
                  displayName: Last Ten Games
                  shortDisplayName: L10
                  description: Record last 10 games
                  type: lasttengames
                  summary: 5-2-3
                  displayValue: 5-2-3, 0 PTS
                - id: "6"
                  name: vs. Div.
                  abbreviation: DIV
                  type: vsdiv
                  summary: 7-3-2
                  displayValue: 7-3-2, 0 PTS
            - team:
                id: "21"
                uid: s:70~l:90~t:21
                location: Toronto
                name: Maple Leafs
                abbreviation: TOR
                displayName: Toronto Maple Leafs
                shortDisplayName: Maple Leafs
                isActive: true
                logos:
                  - href: >-
                      https://a.espncdn.com/i/teamlogos/nhl/500/scoreboard/tor.png
                    width: 500
                    height: 500
                    alt: ""
                    rel:
                      - full
                      - scoreboard
                    lastUpdated: 2018-06-05T12:12Z
                  - href: >-
                      https://a.espncdn.com/i/teamlogos/nhl/500-dark/scoreboard/tor.png
                    width: 500
                    height: 500
                    alt: ""
                    rel:
                      - full
                      - scoreboard
                      - dark
                    lastUpdated: 2018-06-05T12:12Z
                links:
                  - language: en-US
                    rel:
                      - clubhouse
                      - desktop
                      - team
                    href: >-
                      http://www.espn.com/nhl/team/_/name/tor/toronto-maple-leafs
                    text: Clubhouse
                    shortText: Clubhouse
                    isExternal: false
                    isPremium: false
                  - language: en-US
                    rel:
                      - clubhouse
                      - mobile
                      - team
                    href: http://m.espn.com/nhl/clubhouse?teamId=21
                    text: Clubhouse
                    shortText: Clubhouse
                    isExternal: false
                    isPremium: false
              stats:
                - name: otLosses
                  displayName: Overtime Losses
                  shortDisplayName: OTL
                  description: Number of Overtime Losses
                  abbreviation: OTL
                  type: otlosses
                  value: 6
                  displayValue: "6"
                - name: differential
                  displayName: Average Point Differential
                  shortDisplayName: DIFF
                  description: Average Point Differential
                  abbreviation: DIFF
                  type: differential
                  value: 0.20000000000000018
                  displayValue: "+0.2"
                - name: gamesBehind
                  displayName: Games Back
                  shortDisplayName: GB
                  description: Games Back
                  abbreviation: GB
                  type: gamesbehind
                  value: 6
                  displayValue: "6"
                - name: gamesPlayed
                  displayName: Games Played
                  shortDisplayName: GP
                  description: Games Played
                  abbreviation: GP
                  type: gamesplayed
                  value: 30
                  displayValue: "30"
                - name: losses
                  displayName: Losses
                  shortDisplayName: L
                  description: Losses
                  abbreviation: L
                  type: losses
                  value: 8
                  displayValue: "8"
                - name: playoffSeed
                  displayName: Position
                  shortDisplayName: POS
                  description: Playoff Seed
                  abbreviation: SEED
                  type: playoffseed
                  value: 6
                  displayValue: "6"
                - name: pointDifferential
                  displayName: Point Differential
                  shortDisplayName: DIFF
                  description: Point Differential
                  abbreviation: DIFF
                  type: pointdifferential
                  value: 7
                  displayValue: "+7"
                - name: points
                  displayName: Points
                  shortDisplayName: PTS
                  description: Total Points
                  abbreviation: PTS
                  type: points
                  value: 38
                  displayValue: "38"
                - name: pointsAgainst
                  displayName: Goals Against
                  shortDisplayName: GA
                  description: Goals Against
                  abbreviation: GA
                  type: pointsagainst
                  value: 104
                  displayValue: "104"
                - name: pointsFor
                  displayName: Goals For
                  shortDisplayName: GF
                  description: Goals For
                  abbreviation: GF
                  type: pointsfor
                  value: 111
                  displayValue: "111"
                - name: streak
                  displayName: Streak
                  shortDisplayName: STRK
                  description: Current Streak
                  abbreviation: STRK
                  type: streak
                  value: -2
                  displayValue: L2
                - name: wins
                  displayName: Wins
                  shortDisplayName: W
                  description: Wins
                  abbreviation: W
                  type: wins
                  value: 16
                  displayValue: "16"
                - name: overtimeLosses
                  displayName: Overtime Losses
                  shortDisplayName: OT Losses
                  description: Number of Overtime Losses
                  abbreviation: OTL
                  type: overtimelosses
                  value: 6
                  displayValue: "6"
                - name: overtimeWins
                  displayName: Overtime Wins
                  shortDisplayName: OTW Wins
                  description: Number Overtime Wins
                  abbreviation: OTW
                  type: overtimewins
                  value: 7
                  displayValue: "7"
                - name: pointsDiff
                  displayName: Goal Differential
                  shortDisplayName: DIFF
                  description: Goal Differential
                  abbreviation: DIFF
                  type: pointsdiff
                  value: 7
                  displayValue: "+7"
                - name: regWins
                  displayName: Regulation Wins
                  shortDisplayName: RW
                  description: Number of Regulation Wins
                  abbreviation: RW
                  type: regwins
                  value: 9
                  displayValue: "9"
                - name: rotWins
                  displayName: Regulation and Overtime Wins
                  shortDisplayName: ROW Wins
                  description: Number of Regulation and Overtime Wins
                  abbreviation: ROW
                  type: rotwins
                  value: 12
                  displayValue: "12"
                - name: shootoutLosses
                  displayName: Shootout Losses
                  shortDisplayName: SOL
                  description: Shootout Losses
                  abbreviation: SOL
                  type: shootoutlosses
                  value: 1
                  displayValue: "1"
                - name: shootoutWins
                  displayName: Shootout Wins
                  shortDisplayName: SOW
                  description: Shootout Wins
                  abbreviation: SOW
                  type: shootoutwins
                  value: 4
                  displayValue: "4"
                - id: "0"
                  name: overall
                  abbreviation: TOTAL
                  displayName: Team Season Record
                  shortDisplayName: Season
                  description: Overall Record
                  type: total
                  summary: 16-8-6
                  displayValue: 16-8-6, 38 PTS
                - id: "2"
                  name: Home
                  abbreviation: HOME
                  displayName: Home
                  shortDisplayName: HOME
                  description: Home Record
                  type: home
                  summary: 9-5-2
                  displayValue: 9-5-2
                - id: "3"
                  name: Road
                  abbreviation: AWAY
                  displayName: Away
                  shortDisplayName: AWAY
                  description: Away Record
                  type: road
                  summary: 7-3-4
                  displayValue: 7-3-4
                - id: "5"
                  name: Last Ten Games
                  abbreviation: L10
                  displayName: Last Ten Games
                  shortDisplayName: L10
                  description: Record last 10 games
                  type: lasttengames
                  summary: 5-2-3
                  displayValue: 5-2-3, 0 PTS
                - id: "6"
                  name: vs. Div.
                  abbreviation: DIV
                  type: vsdiv
                  summary: 6-4-2
                  displayValue: 6-4-2, 0 PTS
friendly_name: NHL Standings

- code removed for post-

Set recorder to exclude those entities. That will eliminate the errors that it can;t handle large sensors and you have no need for history anyway. IMHO, unless you are doing energy or something, there is no value in any recording. Hence mine (in configuration.yaml) is:

recorder:
    include:
        entity_globs:
            - sensor.speedtest_*
            - sensor.starlink_*

So only speedtest and starlink have recorded stats, none of the others do. Again, the second error refers to teamtracker, not standings.

Do you get standings?

The second error is still a template issue:

homeassistant.exceptions.TemplateError: TemplateSyntaxError: Encountered unknown tag ‘endif’. Jinja was looking for the following tags: ‘endfor’ or ‘else’. The innermost block that needs to be closed is ‘for’

1 Like

I’ll add the following to my configuration.yaml. Please excuse the stupid question. You double indent. Is that an aesthetic preference or requirement?

recorder:
  exclude:
    entities:
      - sensor.nhl_east_metropolitan
      - sensor.nhl_east_atlantic
      - sensor.nhl_wildcard_standings
      - sensor.nhl_west_central
      - sensor.nhl_west_pacific

I’ll dig into the template and try to find my misconfiguration. Thank you!

As an aside. After installing “Glances” I was able to determine that Studio Code Server was killing my system. Every time I opened it last night or today it drove CPU and Memory to crazy levels and was not resetting after closing. I’ve uninstalled it and will try to get reacquainted with Terminal.