Sports Standings and Scores

So my setup is different because I have pulled everything out, and because some of the NCAAF conferences broke the templates I have moved them to sensors.

Try this:
add
sensor: to the top of the template.yaml here is an example of the top of mine:
image

also I would move everything over 2 spaces so it lines up with the left like mine.

let me know if this fixes it.

Sensors look ok. Sometimes it takes a bit to populate.

well…the sensor flag in the template, seemingly worked.

it pulled in statistical data which is AWESOME.

do i have to do anything special for game cards?
is that the sensor.nhl_scores im guessing?

once i can get the game cards working…ill be in hockey heaven lol.

Fantastic. Follow the instructions up top on the cards you need to have installed and then grab the dashboard.yaml data and stick it in a new dashboard.

The Dashboard is basically broken into 2 sections:

  1. Decluttering cards - things you don’t want to clutter up your dashboard and you are repetitively using the same code over and over.
  2. The Views section that is broken up by tabs. I would start with everything and then whittle down the code you don’t want.

I did that, have the dashboard running, but its not pulling game cards. im guessing that is tied to the sensor.nhl_scores sensor, which isnt pulling any data, nor can i find where to see if that sensor is set correctly in the yaml

no info in the Post Game, Live or Pregame tabs on the dashboard (starting goalies isn’t working either, but thats clear its broken currently)

Assuming you followed the steps above, sometimes it takes a bit for the individual team sensors to populate.

You should see pre, in, or post in the attributes like this:

If you see this, it hasn’t been populated yet:
image

You can run a quick test by putting a card in an empty dashboard.

Create a blank dashboard, go to that dashboard click on the 3 dots to go to raw configuration editor.

and then replace what is in there with this:

views:
  - title: Home
    cards:
      - type: custom:teamtracker-card
        entity: sensor.colorado_avalanche
        outline: true
        outline_color: deeppink

You should see something like this:
image

If you see this, most likely teamtracker hasn’t picked up that api yet - it should.
image

sensors are working correctly (IN/PRE), tested the card you suggested on a blank dashboard and that worked, but still no cards populating.

I know @kevvar said something about “erasing” some of this code;

{%- if team in state_attr('sensor.nfl_red_zone','teams') -%}

but he never specified what exactly he did, thoughts?

For your goalie scraper, are you putting that in the sensor.yaml or the template.yaml? and do you have anything else set for goalies?

So that means your sensors are working. Might want to reboot your HA. I didn’t erase the code, i use a similar code for NCAAF to tell me if the conference teams are playing each other, playing a difference conference or playing at home. THat code shouldn’t impact the teamtracker card because one of the earlier checks is to see if the sport is NFL. Here is what I am showing right now. Try a reboot and worse case shake holy water at it :slight_smile:

For the goalies that’s @kbrown01 code and I believe he is using multiscrape for that. You can search this topic and he touches on it a few times on what he is doing.

Here was one of his recent links.
https://community.home-assistant.io/t/sports-standings-and-scores/547094/674?u=bburwell

uodated and have rebooted my HA multiple times through this process…still not getting the cards. Here is 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" -%}
            {%- if team in state_attr('sensor.nfl_red_zone','teams') -%}
              {{{"type": "custom:teamtracker-card",
                "entity": team,
                "card_mod": {"style": "ha-card {\n\n    color:  black; \n    background-color:  #ffcccc; \n    box-shadow: 0 0 10px 5px red;\n}\n"},
                "home_side": "right"}}},
            {%- else -%}
              {{{"type": "custom:teamtracker-card",
                "entity": team, 
                "home_side": "right"}}},
            {%- endif -%}
            {%- endif -%}
            {%- endif -%}
            {%- endif -%}
          {%- endfor -%}
        exclude:
          - entity_id: '*team_tracker*'
      sort:
        method: attribute
        attribute: date
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_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: 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_goalies
                                          - 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_goalies
                                          - 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: Postgame
                        icon: mdi:hockey-sticks
                      card:
                        type: custom:decluttering-card
                        template: game_stats
                        variables:
                          - sport: NHL
                          - status: POST
                    - attributes:
                        label: Live
                        icon: mdi:hockey-puck
                      card:
                        type: custom:decluttering-card
                        template: game_stats
                        variables:
                          - sport: NHL
                          - status: IN
                    - attributes:
                        label: Pregame
                        icon: mdi:blood-bag
                      card:
                        type: custom:decluttering-card
                        template: game_stats
                        variables:
                          - sport: NHL
                          - status: PRE
                    - attributes:
                        label: Starting Goalies
                        icon: mdi:strategy
                      card:
                        type: custom:flex-table-card
                        title: Starting Goalies
                        css:
                          table+: 'padding: 0px; width: 1600px;'
                          tbody tr:hover: >-
                            background-color: green!important;
                            color:white!important;
                          tbody tr td:nth-child(10): 'background-color: green; color: white;'
                        card_mod:
                          style: |
                            ha-card {
                                overflow: auto;
                            }
                            $: |
                                .card-header {
                                   padding: 12px 0px 8px 4px!important;
                                   font-size: 16px!important;
                                   line-height: 18px!important;
                                   font-weight: bold!important;
                                 }
                        entities:
                          include: sensor.nhl_starting_goalies
                        columns:
                          - name: HOME
                            data: data
                            modify: >-
                              '<div><img src="' + x.homeTeamLogoSvg + '"
                              style="height:
                              20px;vertical-align:middle;">&nbsp;' +
                              x.homeTeamName + '</div>'
                          - name: GOALIE
                            data: data
                            modify: x.homeGoalieName
                          - name: RANK
                            data: data
                            modify: >-
                              if(x.homeGoaliePositionRank === null
                              ){'None'}else{x.homeGoaliePositionRank}
                          - name: W
                            data: data
                            modify: >-
                              if(x.homeGoalieWins === null
                              ){'0'}else{x.homeGoalieWins}
                          - name: L
                            data: data
                            modify: >-
                              if(x.homeGoalieLosses === null
                              ){'0'}else{x.homeGoalieLosses}
                          - name: OTL
                            data: data
                            modify: >-
                              if(x.homeGoalieOvertimeLosses === null
                              ){'0'}else{x.homeGoalieOvertimeLosses}
                          - name: SO
                            data: data
                            modify: >-
                              if(x.homeGoalieShutouts === null
                              ){'0'}else{x.homeGoalieShutouts}
                          - name: SVP
                            data: data
                            modify: Number(x.homeGoalieSavePercentage).toFixed(3)
                          - name: GAA
                            data: data
                            modify: Number(x.homeGoalieGoalsAgainstAvg).toFixed(2)
                          - name: PICK
                            data: data
                            modify: |-
                              switch(true){
                                case (x.homeGoalieGoalsAgainstAvg == 0) || (x.awayGoalieGoalsAgainstAvg == 0) :
                                  '<div style="text-align:center;"><ha-icon icon="mdi:crosshairs-question"></div>';
                                  break;
                                case (x.homeGoalieGoalsAgainstAvg - x.awayGoalieGoalsAgainstAvg) > 0:
                                  '<div style="text-align:center;"><ha-icon icon="mdi:arrow-right"></div>';
                                  break;
                                case (x.homeGoalieGoalsAgainstAvg - x.awayGoalieGoalsAgainstAvg) < 0:
                                  '<div style="text-align:center;"><ha-icon icon="mdi:arrow-left"></div>';
                                  break;
                                default:
                                  '<div style="text-align:center;"><ha-icon icon="mdi:arrow-all"></div>';
                                }
                          - name: AWAY
                            data: data
                            modify: >-
                              '<div><img src="' + x.awayTeamLogoSvg + '"
                              style="height:
                              20px;vertical-align:middle;">&nbsp;' +
                              x.awayTeamName + '</div>'
                          - name: GOALIE
                            data: data
                            modify: x.awayGoalieName
                          - name: RANK
                            data: data
                            modify: >-
                              if(x.awayGoaliePositionRank == null
                              ){'None'}else{x.awayGoaliePositionRank}
                          - name: W
                            data: data
                            modify: >-
                              if(x.awayGoalieWins === null
                              ){'0'}else{x.awayGoalieWins}
                          - name: L
                            data: data
                            modify: >-
                              if(x.awayGoalieLosses === null
                              ){'0'}else{x.awayGoalieLosses}
                          - name: OTL
                            data: data
                            modify: >-
                              if(x.awayGoalieOvertimeLosses === null
                              ){'0'}else{x.awayGoalieOvertimeLosses}
                          - name: SO
                            data: data
                            modify: >-
                              if(x.awayGoalieShutouts === null
                              ){'0'}else{x.awayGoalieShutouts}
                          - name: SVP
                            data: data
                            modify: Number(x.awayGoalieSavePercentage).toFixed(3)
                          - name: GAA
                            data: data
                            modify: Number(x.awayGoalieGoalsAgainstAvg).toFixed(2)
title: Sports Standings and Scores

as far as i can tell, all the sensors are set up and reporting correctly. do I have to create individual entities inside the teamtracker integration? its showing 33 entities but i only have 1 listed

and would love to have the single tab option for the live, pre and post…how did you do that? I only really pay attention to 1 team, ill worry about favorties/groups once its fully up and running

No you don’t need to add them into the Integration, that is done in the yaml.

For example here is the beginning of my nhl_sensors.yaml (most likely you have this in sensors.yaml) this gets the teamtracker data puts into sensors. So you need to make sure all of the teamtracker’s are created.

#
##  NHL Teams
##
- platform: teamtracker
  league_id: NHL
  team_id: DET
  name: Detroit Red Wings
- platform: teamtracker
  league_id: NHL
  team_id: NSH
  name: Nashville Predators
- platform: teamtracker
  league_id: NHL
  team_id: FLA
  name: Florida Panthers
- platform: teamtracker
  league_id: NHL
  team_id: STL
  name: St Louis Blues

Go into templates and put this in there and post the results.


{%- for team in integration_entities("teamtracker") -%}
  {{ team }}: {{ states(team) }}
{%- endfor -%}

Do I just leave that code in there?

Would you be willing to share your merged PRE, IN, POST dashboard setup?

Yeah - screen shot shows how i put the code in there and it shows up on the right.

Here is the combined card code:

 - attributes:
                        label: Live,Pre, Post NHL Conference Games
                        icon: mdi:hockey-sticks
                      card:
                        type: horizontal-stack
                        cards:
                          - type: vertical-stack
                            cards:
                              - type: markdown
                                content: |
                                  <h1>NHL Games Live</h1>
                              - type: custom:decluttering-card
                                template: game_stats
                                variables:
                                  - sport: NHL
                                  - status: IN
                              - type: markdown
                                content: |
                                  <h1>NHL Games Coming-up</h1>
                              - type: custom:decluttering-card
                                template: game_stats
                                variables:
                                  - sport: NHL
                                  - status: PRE
                              - type: markdown
                                content: |
                                  <h1>NHL Games Completed</h1>
                              - type: custom:decluttering-card
                                template: game_stats
                                variables:
                                  - sport: NHL
                                  - status: POST

If you have a whole bunch of teamtrackers setup use this instead.

{%- for team in integration_entities("teamtracker") -%}
{%- if state_attr(team, "league") == "NHL" -%}
{{ team }}: {{ states(team) }}
{% endif %}
{%- endfor -%}

I have to be missing something

Pre-reqs:
Teamtracker :white_check_mark:
Flex-Table :white_check_mark:
Layout Card :white_check_mark:
Card-Mod :white_check_mark:
Tabbed Card :white_check_mark:
Stack-in Card :white_check_mark:
Decluttering Card :white_check_mark:

created separted yaml for:
Sensor.yaml :white_check_mark:
Template.yaml :white_check_mark:
Adjusted Config.yaml to point to those yamls :white_check_mark:

Verified all NHL sensors are working :white_check_mark:

  • only NHL sensor not working is "sensor.nhl_scores (idk what or where that is) :x:

Verified all teamtracker sensors are working :white_check_mark:

  • added the code to Template under developer setting :white_check_mark:

Created dsahboard (with edits, for NHL only and merged Games tab down) :white_check_mark:

  • Standings works :white_check_mark:
  • still no game cards :x:

I’ve restarted HA multiple times and short of posting every ounce of code for each file, im at a loss.

On an unrelated note:

How would I go about adding a line above “Eastern Atlantic” that just says “Eastern Conference”? That way I can just have “Atlantic” or Metropolitan". Similarly, would do the same for above “Western Central” that just says “Western Conference”

Disregard, I got it.

A couple things:

  • Can you post what the template showed? Here is mine currently

  • Take a look at the logs and see if there are any errors.

  • You could also redownloaded teamtracker

or you can try this

  • Create a new dashboard and copy and post this to it and save it. Then goto Sandbox - NHL Testing and see what pops up?
decluttering_templates:
  nhl_settings:
    card:
      type: custom:flex-table-card
      title: |
        [[[ 
          var marquee_sensor = [['marquee']]; 
          return states[marquee_sensor].state; 
        ]]]
      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: >-
            if(typeof x.stats.find(y=>y.abbreviation == 'L10') !== 'undefined'
            ){x.stats.find(y=>y["abbreviation"] == 'L10').summary}else{'-'}
        - 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" -%}
            {%- if team in state_attr('sensor.nfl_red_zone','teams') -%}
              {{{"type": "custom:teamtracker-card",
                "entity": team,
                "card_mod": {"style": "ha-card {\n\n    color:  black; \n    background-color:  #ffcccc; \n    box-shadow: 0 0 10px 5px red;\n}\n"},
                "home_side": "right"}}},
            {%- else -%}
              {{{"type": "custom:teamtracker-card",
                "entity": team, 
                "home_side": "right"}}},
            {%- endif -%}
            {%- endif -%}
            {%- endif -%}
            {%- endif -%}
          {%- endfor -%}
        exclude:
          - entity_id: '*team_tracker*'
      sort:
        method: attribute
        attribute: date
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: black;
                color: silver;
                border-color: var(--ha-card-border-color, var(--divider-color, #e0e0e0));
                border-width: 2px;
                border-style: solid;
                overflow: hidden;
                width: 20%;
              }
              mwc-tab[active] {
                background: white !important;
                color: black !important;
              }
        card:
          type: custom:tabbed-card
          show_header_toggle: true
          styles:
            '--mdc-theme-primary': black
            '--mdc-tab-text-label-color-default': silver
            '--mdc-typography-button-font-size': 12px
          tabs:
            - attributes:
                label: Sandbox
                icon: mdi:school
              card:
                type: custom:mod-card
                card_mod:
                  style:
                    tabbed-card $: |
                      mwc-tab {
                        background: black;
                        border-color: silver;
                        border-width: 2px;
                        border-top-left-radius: 20px;
                        border-top-right-radius: 20px;
                        border-style: solid;
                        overflow: hidden;
                        width: 15%;
                      }
                      mwc-tab[active] {
                        background: white !important;
                        color: black !important
                      }
                card:
                  type: custom:tabbed-card
                  card_mod: null
                  style:
                    tabbed-card $: |
                      mwc-tab {
                        background: black;
                        border-color: silver;
                        border-width: 2px;
                        border-top-left-radius: 20px;
                        border-top-right-radius: 20px;
                        border-style: solid;
                        overflow: hidden;
                        width: 10%;
                      }
                      mwc-tab[active] {
                        background: white !important;
                        color: black !important
                      }
                  tabs:
                    - attributes:
                        label: Live,Pre, Post NHL Conference Games
                        icon: mdi:hockey-sticks
                      card:
                        type: horizontal-stack
                        cards:
                          - type: vertical-stack
                            cards:
                              - type: markdown
                                content: |
                                  <h1>NHL Games Live</h1>
                              - type: custom:decluttering-card
                                template: game_stats
                                variables:
                                  - sport: NHL
                                  - status: IN
                              - type: markdown
                                content: |
                                  <h1>NHL Games Coming-up</h1>
                              - type: custom:decluttering-card
                                template: game_stats
                                variables:
                                  - sport: NHL
                                  - status: PRE
                              - type: markdown
                                content: |
                                  <h1>NHL Games Completed</h1>
                              - type: custom:decluttering-card
                                template: game_stats
                                variables:
                                  - sport: NHL
                                  - status: POST
title: Sports Standings and Scores

Here is what I see right now

ill work on the second part of you post in a little while, for now, here is the screenshot

added that dashboard into a brand new dashboard and this is what i get:

do you have in your sensors a “sensor.nhl_scores” sensor?

THIS MIGHT BE IMPORTANT lol…any thoughts?

Logger: homeassistant.helpers.event
Source: helpers/template.py:635
First occurred: 4:01:01 PM (24 occurrences)
Last logged: 4:49:15 PM

Error while processing template: Template<template=({%- for team in integration_entities("teamtracker") -%} {%- if state_attr(team, "league") == "NHL" -%} {%- if states(team) == "POST" -%} {%- if state_attr(team, "team_homeaway") == "home" -%} {%- if team in state_attr('sensor.nfl_red_zone','teams') -%} {{{"type": "custom:teamtracker-card", "entity": team, "card_mod": {"style": "ha-card {\n\n color: black; \n background-color: #ffcccc; \n box-shadow: 0 0 10px 5px red;\n}\n"}, "home_side": "right"}}}, {%- else -%} {{{"type": "custom:teamtracker-card", "entity": team, "home_side": "right"}}}, {%- endif -%} {%- endif -%} {%- endif -%} {%- endif -%} {%- endfor -%}) renders=46>
Error while processing template: Template<template=({%- for team in integration_entities("teamtracker") -%} {%- if state_attr(team, "league") == "NHL" -%} {%- if states(team) == "PRE" -%} {%- if state_attr(team, "team_homeaway") == "home" -%} {%- if team in state_attr('sensor.nfl_red_zone','teams') -%} {{{"type": "custom:teamtracker-card", "entity": team, "card_mod": {"style": "ha-card {\n\n color: black; \n background-color: #ffcccc; \n box-shadow: 0 0 10px 5px red;\n}\n"}, "home_side": "right"}}}, {%- else -%} {{{"type": "custom:teamtracker-card", "entity": team, "home_side": "right"}}}, {%- endif -%} {%- endif -%} {%- endif -%} {%- endif -%} {%- endfor -%}) renders=52>
Error while processing template: Template<template=({%- for team in integration_entities("teamtracker") -%} {%- if state_attr(team, "league") == "NHL" -%} {%- if states(team) == "POST" -%} {%- if state_attr(team, "team_homeaway") == "home" -%} {%- if team in state_attr('sensor.nfl_red_zone','teams') -%} {{{"type": "custom:teamtracker-card", "entity": team, "card_mod": {"style": "ha-card {\n\n color: black; \n background-color: #ffcccc; \n box-shadow: 0 0 10px 5px red;\n}\n"}, "home_side": "right"}}}, {%- else -%} {{{"type": "custom:teamtracker-card", "entity": team, "home_side": "right"}}}, {%- endif -%} {%- endif -%} {%- endif -%} {%- endif -%} {%- endfor -%}) renders=50>
Error while processing template: Template<template=({%- for team in integration_entities("teamtracker") -%} {%- if state_attr(team, "league") == "NHL" -%} {%- if states(team) == "PRE" -%} {%- if state_attr(team, "team_homeaway") == "home" -%} {%- if team in state_attr('sensor.nfl_red_zone','teams') -%} {{{"type": "custom:teamtracker-card", "entity": team, "card_mod": {"style": "ha-card {\n\n color: black; \n background-color: #ffcccc; \n box-shadow: 0 0 10px 5px red;\n}\n"}, "home_side": "right"}}}, {%- else -%} {{{"type": "custom:teamtracker-card", "entity": team, "home_side": "right"}}}, {%- endif -%} {%- endif -%} {%- endif -%} {%- endif -%} {%- endfor -%}) renders=56>
Error while processing template: Template<template=({%- for team in integration_entities("teamtracker") -%} {%- if state_attr(team, "league") == "NHL" -%} {%- if states(team) == "POST" -%} {%- if state_attr(team, "team_homeaway") == "home" -%} {%- if team in state_attr('sensor.nfl_red_zone','teams') -%} {{{"type": "custom:teamtracker-card", "entity": team, "card_mod": {"style": "ha-card {\n\n color: black; \n background-color: #ffcccc; \n box-shadow: 0 0 10px 5px red;\n}\n"}, "home_side": "right"}}}, {%- else -%} {{{"type": "custom:teamtracker-card", "entity": team, "home_side": "right"}}}, {%- endif -%} {%- endif -%} {%- endif -%} {%- endif -%} {%- endfor -%}) renders=54>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 633, in async_render
    render_result = _render_with_context(self.template, compiled, **kwargs)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2735, in _render_with_context
    return template.render(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/jinja2/environment.py", line 1304, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.12/site-packages/jinja2/environment.py", line 939, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "<template>", line 5, in top-level template code
TypeError: argument of type 'NoneType' is not iterable

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 750, in async_render_to_info
    render_info._result = self.async_render(  # noqa: SLF001
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 635, in async_render
    raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: TypeError: argument of type 'NoneType' is not iterable