Sports Standings and Scores

Dashboard decluttering code that goes with the previous:

ncaa_team_schedules_2:
    card:
      type: custom:flex-table-card
      title: name
      css:
        table+: 'padding: 0px; width: 1200px;'
        tbody tr td:first-child: 'width: 5%;'
        tbody tr td:nth-child(2): 'width: 5%;'
        tbody tr td:nth-child(n+2): 'width: 5%;'
        tbody tr:hover: 'background-color: black!important; color:white!important;'
        tbody tr td:nth-child(4): 'background-color: mintcream; 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;
            }
      sort_by: events+
      entities:
        include:
          - '[[entity]]'
        exclude: '[[excluded_entities]]'
      columns:
        - name: Game Date
          data: '[[events]]'
          modify: x.date.split('T')[0]
        - name: Teams
          data: '[[events]]'
          modify: x.shortName
        - name: Away Team
          data: '[[events]]'
          modify: >-
            '<div><img src="' +
            x.competitions[0].competitors[1].team.logos[0].href + '"
            style="height: 20px;vertical-align:middle;">&nbsp;' +
            x.competitions[0].competitors[1].team.displayName + '</div>'
        - name: Final Score (Away-Home)
          data: '[[events]]'
          modify: |-
            if (typeof x !== 'undefined' &&
                typeof x.competitions[0].competitors[0].score !== 'undefined' &&
                typeof x.competitions[0].competitors[1].score !== 'undefined') {
              let content = '';
              let icon = '<ha-icon icon="mdi:minus" style="fill:white;"></ha-icon>';
              let home_score = x.competitions[0].competitors[0].score.value;
              let away_score = x.competitions[0].competitors[1].score.value;


              if (home_score > away_score) {
                content = `<div style="font-size:20px;color:red;">${away_score}</div>` +
                          `<div style="font-size:20px;color:black;margin:0 5px;">-</div>` +
                          `<div style="font-size:20px;color:green;">${home_score}</div>`;
              } else if (home_score < away_score) {
                content = `<div style="font-size:20px;color:green;">${away_score}</div>` +
                          `<div style="font-size:20px;color:black;margin:0 5px;">-</div>` +
                          `<div style="font-size:20px;color:red;">${home_score}</div>`;
              } else {
                content = `<div style="font-size:20px;color:black;">${away_score}-${home_score}</div>`;
              }
                            
              content = `<div style="display:flex;align-items:center;justify-content:center;width:100%;height:100%;">` +
                content +
                `</div>`
                
              content;
            } else {
              '';
            }

And finally
And in views - on Big12 - this is a single tab section you can line up with your other attributes.

- attributes:
                                label: Big 12
                                icon: mdi:account-group
                              card:
                                type: horizontal-stack
                                cards:
                                  - type: vertical-stack
                                    cards:
                                      - type: custom:decluttering-card
                                        template: ncaa_conference_settings
                                        variables:
                                          - title: NCAA Big 12 Conference
                                          - entity: sensor.ncaaf_big_12_games
                                          - attribute: events
                                      - type: custom:decluttering-card
                                        template: ncaaf_conference_game_stats
                                        variables:
                                          - group: group.big_12_conference_teams_group
                                          - team_names: sensor.ncaaf_team_names_big_12
                                  - type: vertical-stack
                                    cards:
                                      - type: custom:expander-card
                                        child-margin-top: 0.6em
                                        padding: 0
                                        title: Conference Standings
                                        title-card-button-overlay: true
                                        title-card-clickable: true
                                        expanded: false
                                        cards:
                                          - type: custom:decluttering-card
                                            template: ncaa_football_standings
                                            variables:
                                              - title: Big 12 Conference
                                              - entity: sensor.ncaaf_conference_big_12
                                              - attribute: entries
                                      - type: markdown
                                        content: >
                                          <h1>Team
                                          Schedules</h1>                                         
                                      - type: custom:expander-card
                                        child-margin-top: 0.6em
                                        padding: 0
                                        title: Arizona State University
                                        title-card-button-overlay: true
                                        title-card-clickable: true
                                        expanded: false
                                        cards:
                                          - type: custom:decluttering-card
                                            template: ncaa_team_schedules_2
                                            variables:
                                              - title: Teams
                                              - entity: >-
                                                  sensor.ncaaf_schedule_big_12_arizona_state_university
                                              - events: events
                                              - team: team
                                              - abbreviation: abbreviation
                                          - type: custom:decluttering-card
                                            template: ncaa_team_schedules
                                            variables:
                                              - title: NCAA Big 12 Schedules
                                              - entity: >-
                                                  sensor.ncaaf_schedule_big_12_arizona_state_university
                                              - events: events
                                              - team: team
                                      - type: custom:expander-card
                                        child-margin-top: 0.6em
                                        padding: 0
                                        title: University of Arizona
                                        title-card-button-overlay: true
                                        title-card-clickable: true
                                        expanded: false
                                        cards:
                                          - type: custom:decluttering-card
                                            template: ncaa_team_schedules_2
                                            variables:
                                              - title: Teams
                                              - entity: >-
                                                  sensor.ncaaf_schedule_big_12_university_of_arizona
                                              - events: events
                                              - team: team
                                              - abbreviation: abbreviation
                                          - type: custom:decluttering-card
                                            template: ncaa_team_schedules
                                            variables:
                                              - title: NCAA Big 12 Schedules
                                              - entity: >-
                                                  sensor.ncaaf_schedule_big_12_university_of_arizona
                                              - events: events
                                              - team: team
                                      - type: custom:expander-card
                                        child-margin-top: 0.6em
                                        padding: 0
                                        title: Baylor University
                                        title-card-button-overlay: true
                                        title-card-clickable: true
                                        expanded: false
                                        cards:
                                          - type: custom:decluttering-card
                                            template: ncaa_team_schedules_2
                                            variables:
                                              - title: Teams
                                              - entity: >-
                                                  sensor.ncaaf_schedule_big_12_baylor_university
                                              - events: events
                                              - team: team
                                              - abbreviation: abbreviation
                                          - type: custom:decluttering-card
                                            template: ncaa_team_schedules
                                            variables:
                                              - title: NCAA Big 12 Schedules
                                              - entity: >-
                                                  sensor.ncaaf_schedule_big_12_baylor_university
                                              - events: events
                                              - team: team
                                      - type: custom:expander-card
                                        child-margin-top: 0.6em
                                        padding: 0
                                        title: Brigham Youngh University
                                        title-card-button-overlay: true
                                        title-card-clickable: true
                                        expanded: false
                                        cards:
                                          - type: custom:decluttering-card
                                            template: ncaa_team_schedules_2
                                            variables:
                                              - title: Teams
                                              - entity: >-
                                                  sensor.ncaaf_schedule_big_12_brigham_young_university
                                              - events: events
                                              - team: team
                                              - abbreviation: abbreviation
                                          - type: custom:decluttering-card
                                            template: ncaa_team_schedules
                                            variables:
                                              - title: NCAA Big 12 Schedules
                                              - entity: >-
                                                  sensor.ncaaf_schedule_big_12_brigham_young_university
                                              - events: events
                                              - team: team
                                      - type: custom:expander-card
                                        child-margin-top: 0.6em
                                        padding: 0
                                        title: University of Central Floriida
                                        title-card-button-overlay: true
                                        title-card-clickable: true
                                        expanded: false
                                        cards:
                                          - type: custom:decluttering-card
                                            template: ncaa_team_schedules_2
                                            variables:
                                              - title: Teams
                                              - entity: >-
                                                  sensor.ncaaf_schedule_big_12_university_of_central_florida
                                              - events: events
                                              - team: team
                                              - abbreviation: abbreviation
                                          - type: custom:decluttering-card
                                            template: ncaa_team_schedules
                                            variables:
                                              - title: NCAA Big 12 Schedules
                                              - entity: >-
                                                  sensor.ncaaf_schedule_big_12_university_of_central_florida
                                              - events: events
                                              - team: team
                                      - type: custom:expander-card
                                        child-margin-top: 0.6em
                                        padding: 0
                                        title: University of Cincinnati
                                        title-card-button-overlay: true
                                        title-card-clickable: true
                                        expanded: false
                                        cards:
                                          - type: custom:decluttering-card
                                            template: ncaa_team_schedules_2
                                            variables:
                                              - title: Teams
                                              - entity: >-
                                                  sensor.ncaaf_schedule_big_12_university_of_cincinnati
                                              - events: events
                                              - team: team
                                              - abbreviation: abbreviation
                                          - type: custom:decluttering-card
                                            template: ncaa_team_schedules
                                            variables:
                                              - title: NCAA Big 12 Schedules
                                              - entity: >-
                                                  sensor.ncaaf_schedule_big_12_university_of_cincinnati
                                              - events: events
                                              - team: team
                                      - type: custom:expander-card
                                        child-margin-top: 0.6em
                                        padding: 0
                                        title: University of Colorado Boulder
                                        title-card-button-overlay: true
                                        title-card-clickable: true
                                        expanded: false
                                        cards:
                                          - type: custom:decluttering-card
                                            template: ncaa_team_schedules_2
                                            variables:
                                              - title: Teams
                                              - entity: >-
                                                  sensor.ncaaf_schedule_big_12_university_colorado
                                              - events: events
                                              - team: team
                                              - abbreviation: abbreviation
                                          - type: custom:decluttering-card
                                            template: ncaa_team_schedules
                                            variables:
                                              - title: NCAA Big 12 Schedules
                                              - entity: >-
                                                  sensor.ncaaf_schedule_big_12_university_colorado
                                              - events: events
                                              - team: team
                                      - type: custom:expander-card
                                        child-margin-top: 0.6em
                                        padding: 0
                                        title: University of Houston
                                        title-card-button-overlay: true
                                        title-card-clickable: true
                                        expanded: false
                                        cards:
                                          - type: custom:decluttering-card
                                            template: ncaa_team_schedules_2
                                            variables:
                                              - title: Teams
                                              - entity: >-
                                                  sensor.ncaaf_schedule_big_12_university_of_houston
                                              - events: events
                                              - team: team
                                              - abbreviation: abbreviation
                                          - type: custom:decluttering-card
                                            template: ncaa_team_schedules
                                            variables:
                                              - title: NCAA Big 12 Schedules
                                              - entity: >-
                                                  sensor.ncaaf_schedule_big_12_university_of_houston
                                              - events: events
                                              - team: team
                                      - type: custom:expander-card
                                        child-margin-top: 0.6em
                                        padding: 0
                                        title: Iowa State University
                                        title-card-button-overlay: true
                                        title-card-clickable: true
                                        expanded: false
                                        cards:
                                          - type: custom:decluttering-card
                                            template: ncaa_team_schedules_2
                                            variables:
                                              - title: Teams
                                              - entity: >-
                                                  sensor.ncaaf_schedule_big_12_iowa_state_university
                                              - events: events
                                              - team: team
                                              - abbreviation: abbreviation
                                          - type: custom:decluttering-card
                                            template: ncaa_team_schedules
                                            variables:
                                              - title: NCAA Big 12 Schedules
                                              - entity: >-
                                                  sensor.ncaaf_schedule_big_12_iowa_state_university
                                              - events: events
                                              - team: team
                                      - type: custom:expander-card
                                        child-margin-top: 0.6em
                                        padding: 0
                                        title: University of Kansas
                                        title-card-button-overlay: true
                                        title-card-clickable: true
                                        expanded: false
                                        cards:
                                          - type: custom:decluttering-card
                                            template: ncaa_team_schedules_2
                                            variables:
                                              - title: Teams
                                              - entity: >-
                                                  sensor.ncaaf_schedule_big_12_univeristy_of_kansas
                                              - events: events
                                              - team: team
                                              - abbreviation: abbreviation
                                          - type: custom:decluttering-card
                                            template: ncaa_team_schedules
                                            variables:
                                              - title: NCAA Big 12 Schedules
                                              - entity: >-
                                                  sensor.ncaaf_schedule_big_12_univeristy_of_kansas
                                              - events: events
                                              - team: team
                                      - type: custom:expander-card
                                        child-margin-top: 0.6em
                                        padding: 0
                                        title: Kansas State University
                                        title-card-button-overlay: true
                                        title-card-clickable: true
                                        expanded: false
                                        cards:
                                          - type: custom:decluttering-card
                                            template: ncaa_team_schedules_2
                                            variables:
                                              - title: Teams
                                              - entity: >-
                                                  sensor.ncaaf_schedule_big_12_kansas_state_university
                                              - events: events
                                              - team: team
                                              - abbreviation: abbreviation
                                          - type: custom:decluttering-card
                                            template: ncaa_team_schedules
                                            variables:
                                              - title: NCAA Big 12 Schedules
                                              - entity: >-
                                                  sensor.ncaaf_schedule_big_12_kansas_state_university
                                              - events: events
                                              - team: team
                                      - type: custom:expander-card
                                        child-margin-top: 0.6em
                                        padding: 0
                                        title: Oklahoma State University
                                        title-card-button-overlay: true
                                        title-card-clickable: true
                                        expanded: false
                                        cards:
                                          - type: custom:decluttering-card
                                            template: ncaa_team_schedules_2
                                            variables:
                                              - title: Teams
                                              - entity: >-
                                                  sensor.ncaaf_schedule_big_12_oklahoma_state_university
                                              - events: events
                                              - team: team
                                              - abbreviation: abbreviation
                                          - type: custom:decluttering-card
                                            template: ncaa_team_schedules
                                            variables:
                                              - title: NCAA Big 12 Schedules
                                              - entity: >-
                                                  sensor.ncaaf_schedule_big_12_oklahoma_state_university
                                              - events: events
                                              - team: team
                                      - type: custom:expander-card
                                        child-margin-top: 0.6em
                                        padding: 0
                                        title: Texas Christian University
                                        title-card-button-overlay: true
                                        title-card-clickable: true
                                        expanded: false
                                        cards:
                                          - type: custom:decluttering-card
                                            template: ncaa_team_schedules_2
                                            variables:
                                              - title: Teams
                                              - entity: >-
                                                  sensor.ncaaf_schedule_big_12_texas_christian_university
                                              - events: events
                                              - team: team
                                              - abbreviation: abbreviation
                                          - type: custom:decluttering-card
                                            template: ncaa_team_schedules
                                            variables:
                                              - title: NCAA Big 12 Schedules
                                              - entity: >-
                                                  sensor.ncaaf_schedule_big_12_texas_christian_university
                                              - events: events
                                              - team: team
                                      - type: custom:expander-card
                                        child-margin-top: 0.6em
                                        padding: 0
                                        title: Texas Tech University
                                        title-card-button-overlay: true
                                        title-card-clickable: true
                                        expanded: false
                                        cards:
                                          - type: custom:decluttering-card
                                            template: ncaa_team_schedules_2
                                            variables:
                                              - title: Teams
                                              - entity: >-
                                                  sensor.ncaaf_schedule_big_12_texas_tech_university
                                              - events: events
                                              - team: team
                                              - abbreviation: abbreviation
                                          - type: custom:decluttering-card
                                            template: ncaa_team_schedules
                                            variables:
                                              - title: NCAA Big 12 Schedules
                                              - entity: >-
                                                  sensor.ncaaf_schedule_big_12_texas_tech_university
                                              - events: events
                                              - team: team
                                      - type: custom:expander-card
                                        child-margin-top: 0.6em
                                        padding: 0
                                        title: University of Utah
                                        title-card-button-overlay: true
                                        title-card-clickable: true
                                        expanded: false
                                        cards:
                                          - type: custom:decluttering-card
                                            template: ncaa_team_schedules_2
                                            variables:
                                              - title: Teams
                                              - entity: >-
                                                  sensor.ncaaf_schedule_big_12_university_of_utah
                                              - events: events
                                              - team: team
                                              - abbreviation: abbreviation
                                          - type: custom:decluttering-card
                                            template: ncaa_team_schedules
                                            variables:
                                              - title: NCAA Big 12 Schedules
                                              - entity: >-
                                                  sensor.ncaaf_schedule_big_12_university_of_utah
                                              - events: events
                                              - team: team
                                      - type: custom:expander-card
                                        child-margin-top: 0.6em
                                        padding: 0
                                        title: West Virginia University
                                        title-card-button-overlay: true
                                        title-card-clickable: true
                                        expanded: false
                                        cards:
                                          - type: custom:decluttering-card
                                            template: ncaa_team_schedules_2
                                            variables:
                                              - title: Teams
                                              - entity: >-
                                                  sensor.ncaaf_schedule_big_12_west_virginia_university
                                              - events: events
                                              - team: team
                                              - abbreviation: abbreviation
                                          - type: custom:decluttering-card
                                            template: ncaa_team_schedules
                                            variables:
                                              - title: NCAA Big 12 Schedules
                                              - entity: >-
                                                  sensor.ncaaf_schedule_big_12_west_virginia_university
                                              - events: events
                                              - team: team

I just wanted to thank @bburwell as well as @ehcah, @compoundbow83, @jeffcrum and others I may have missed for all of their excellent contributions to this. I knew when I started it that people will move what was done originally (but hey, those are the sports I like), they would expand it, add to it, change it.

I knew this could never be “a HACS plug-in thing”, too much work for me or others and too much customizations.

And so it moves on, with excellent changes. The whole NCAAF thing is awesome. Just wait until all the requests for NCAAB, NCAAW , There are 642 discussions i this thread, that is more than many custom cards or even some integrations get.

After the year end I hope to have more time to do something more.

I really would like to have some dashboard visibility to Fantasy sports.

3 Likes

Can anyone help me with REST API and template for the English premier league standing? got the Belgium league working just cannot seem to get the EPL.

Can you post your code for Belgium? I created a sandbox (this is only 10 mintues so not a lot of detail) but would guess someone already has this created. @ehcah probably has what I would start with because he has the promotion/demotion colors already coded, I don’t know if he has EPL but his code could be easily adjusted.

I didn’t create the teamtracker teams - hoping someone has those and can post.

Looks like preseason so I just created a soccer_sensors.yaml with this code:

- platform: rest
  scan_interval: 36000
  name: EPL Standings
  unique_id: sensor.epl_standings
  resource: https://site.web.api.espn.com/apis/v2/sports/soccer/eng.1/standings?seasontype=1&type=0&level=3
  value_template: "{{ now() }}"
  json_attributes:
      - children

- platform: rest
  scan_interval: 36000
  name: soccer_english_premier_league
  unique_id: sensor.soccer_english_premier_league
  resource: https://site.web.api.espn.com/apis/v2/sports/soccer/eng.1/standings?seasontype=1&type=0&level=3
  value_template: "{{ now() }}"
  json_attributes_path: "$.[0]['standings']"
  json_attributes: 
   - entries

and here is my sandbox that at least may get you started:

decluttering_templates:
  soccer_standings:
    card:
      type: custom:flex-table-card
      title: '[[title]]'
      css:
        table+: 'padding: 0px; width: 100%; border-collapse: collapse; margin-top:12px;'
        tbody tr td:first-child: 'width: 1%;'
        tbody tr td:nth-child(2): 'width: 1%;'
        tbody tr td:nth-child(3): 'width: 3%;'
        tbody tr td:nth-child(n+4): 'width: 1%;'
        tbody tr td:nth-child(5): 'color: green;'
        tbody tr td:nth-child(6): 'color: yellow;'
        tbody tr td:nth-child(7): 'color: red;'
        tbody tr td:nth-child(10): 'background-color: green; color: white;'
        tbody tr:hover: 'background-color: dimgrey!important; color:white!important;'
        tbody tr:nth-child(4): 'border-bottom: 2px solid green!important;'
        tbody tr:nth-child(5): 'border-bottom: 2px solid dodgerblue!important;'
        tbody tr:nth-child(6): 'border-bottom: 2px solid dodgerblue!important;'
        tbody tr:nth-child(15): 'border-bottom: 2px solid yellow!important;'
        tbody tr:nth-child(16): 'border-bottom: 2px solid crimson!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;
             }
      sort_by:
        - entries+
      entities:
        include: '[[entity]]'
      columns:
        - name: Rank
          data: entries
          modify: >-
            if(typeof x.stats.find(y=>y.abbreviation == 'R')
            !=='undefined'){x.stats.find(y=>y.abbreviation ==
            'R').displayValue}else{'-'}                   
        - name: Team
          data: entries
          modify: |-
            if (typeof x.team.logos !== 'undefined')
              '<div><img src="' + x.team.logos[0].href + '" style="height:20px;vertical-align:middle;">&nbsp;' + x.team.displayName + '</div>'
            else
              '<div><span style="display: inline-block;width: 20px;"></span>&nbsp;' + x.team.displayName + '</div>'
        - name: Record
          data: entries
          hidden: false
          modify: >-
            if(typeof x.stats.find(y=>y.abbreviation == 'Total') !== 'undefined'
            ){x.stats.find(y=>y.abbreviation == 'Total').displayValue}else{'-'}
        - name: Wins
          data: entries
          hidden: false
          modify: >-
            if(typeof x.stats.find(y=>y.abbreviation == 'W') !== 'undefined'
            ){x.stats.find(y=>y.abbreviation == 'W').displayValue}else{'-'}
        - name: Losses
          data: entries
          modify: >-
            if(typeof x.stats.find(y=>y.abbreviation == 'L') !== 'undefined'
            ){x.stats.find(y=>y.abbreviation == 'L').displayValue}else{'-'}
        - name: Draws
          data: entries
          modify: >-
            if(typeof x.stats.find(y=>y.abbreviation == 'D') !== 'undefined'
            ){x.stats.find(y=>y.abbreviation == 'D').displayValue}else{'-'}
        - name: Points
          data: entries
          modify: >-
            if(typeof x.stats.find(y=>y.abbreviation == 'P') !== 'undefined'
            ){x.stats.find(y=>y.abbreviation == 'P').displayValue}else{'-'}
          align: center
  game_stats:
    card:
      type: custom:auto-entities
      unique: true
      show_empty: false
      card:
        type: custom:layout-card
        layout_type: grid
        layout:
          grid-template-columns: repeat(auto-fit, minmax(280px, 1fr))
      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 { font-size: .7em; line-height: .7em; width: 280px;}"},
                "home_side": "right"}}},
            {%- else -%}
              {{{"type": "custom:teamtracker-card",
                "entity": team,
                "card_mod": {"style": "ha-card { font-size: .7em; line-height: .7em; width: 280px;}"},
                "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
          styles:
            '--mdc-theme-primary': black
            '--mdc-tab-text-label-color-default': silver
            '--mdc-typography-button-font-size': 12px
          tabs:
            - attributes:
                label: Soccer
                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: Leagues
                        icon: mdi:football
                      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: 5%;
                              }
                              mwc-tab[active] {
                                background: white !important;
                                color: black !important;
                              }
                        card:
                          type: custom:tabbed-card
                          styles:
                            '--mdc-theme-primary': black
                            '--mdc-tab-text-label-color-default': silver
                            '--mdc-typography-button-font-size': 12px
                          tabs:
                            - attributes:
                                label: Premier Legue (EPL)
                                icon: mdi:account-group
                              card:
                                type: horizontal-stack
                                cards:
                                  - type: vertical-stack
                                    cards:
                                      - type: markdown
                                        content: |
                                          <h1>EPL Standings
                                      - type: custom:decluttering-card
                                        template: soccer_standings
                                        variables:
                                          - title: EPL Standings
                                          - entity: sensor.soccer_english_premier_league
                                          - attribute: entries
                            - attributes:
                                label: Pre,Live,Post EPL Games
                                icon: mdi:account-group
                              card:
                                type: horizontal-stack
                                cards:
                                  - type: vertical-stack
                                    cards:
                                      - type: markdown
                                        content: |
                                          <h1>EPL Games Live</h1>
                                      - type: custom:decluttering-card
                                        template: game_stats
                                        variables:
                                          - sport: EPL
                                          - sport_path: soccer
                                          - status: IN
                                      - type: markdown
                                        content: |
                                          <h1>EPL Games Coming-up</h1>
                                      - type: custom:decluttering-card
                                        template: game_stats
                                        variables:
                                          - sport: EPL
                                          - sport_path: soccer
                                          - status: PRE
                                      - type: markdown
                                        content: |
                                          <h1>EPL Games Completed</h1>
                                      - type: custom:decluttering-card
                                        template: game_stats
                                        variables:
                                          - sport: EPL
                                          - sport_path: soccer
                                          - status: POST
title: Soccer Sports Standings and Scores


Updated: cleaned up

Update 2-over the characters so slimming down some of the code

# Premier League
- platform: rest
  scan_interval: 36000
  name: soccer_english_premier_league
  unique_id: sensor.soccer_english_premier_league
  resource: https://site.web.api.espn.com/apis/v2/sports/soccer/eng.1/standings?seasontype=1&type=0&level=3
  value_template: "{{ now() }}"
  json_attributes_path: "$.[0]['standings']"
  json_attributes: 
   - entries
   
# Championship League   
- platform: rest
  scan_interval: 36000
  name: soccer_english_league_championship
  unique_id: sensor.soccer_english_league_championship
  resource: https://site.web.api.espn.com/apis/v2/sports/soccer/eng.2/standings?seasontype=1&type=0&level=3
  value_template: "{{ now() }}"
  json_attributes_path: "$.[0]['standings']"
  json_attributes: 
   - entries
# English League One
- platform: rest
  scan_interval: 36000
  name: soccer_english_league_one
  unique_id: sensor.soccer_english_league_one
  resource: https://site.web.api.espn.com/apis/v2/sports/soccer/eng.3/standings?seasontype=1&type=0&level=3
  value_template: "{{ now() }}"
  json_attributes_path: "$.[0]['standings']"
  json_attributes: 
   - entries
# English League Two
- platform: rest
  scan_interval: 36000
  name: soccer_english_league_two
  unique_id: sensor.soccer_english_league_two
  resource: https://site.web.api.espn.com/apis/v2/sports/soccer/eng.4/standings?seasontype=1&type=0&level=3
  value_template: "{{ now() }}"
  json_attributes_path: "$.[0]['standings']"
  json_attributes: 
   - entries
# English National League
- platform: rest
  scan_interval: 36000
  name: soccer_english_national_league
  unique_id: sensor.soccer_english_national_league
  resource: https://site.web.api.espn.com/apis/v2/sports/soccer/eng.5/standings?seasontype=1&type=0&level=3
  value_template: "{{ now() }}"
  json_attributes_path: "$.[0]['standings']"
  json_attributes: 
   - entries
# Bundesliga
- platform: rest
  scan_interval: 36000
  name: soccer_bundesliga
  unique_id: sensor.soccer_bundesliga
  resource: https://site.web.api.espn.com/apis/v2/sports/soccer/ger.1/standings?seasontype=1&type=0&level=3
  value_template: "{{ now() }}"
  json_attributes_path: "$.[0]['standings']"
  json_attributes: 
   - entries

- platform: rest
  scan_interval: 36000
  name: soccer_bundesliga_two
  unique_id: sensor.soccer_bundesliga_two
  resource: https://site.web.api.espn.com/apis/v2/sports/soccer/ger.2/standings?seasontype=1&type=0&level=3
  value_template: "{{ now() }}"
  json_attributes_path: "$.[0]['standings']"
  json_attributes: 
   - entries
# MLS Western & Eastern Confernces
- platform: rest
  scan_interval: 36000
  name: soccer_mls_western_conference
  unique_id: sensor.soccer_mls_western_conference
  resource: https://site.web.api.espn.com/apis/v2/sports/soccer/usa.1/standings?seasontype=1&type=0&level=3
  value_template: "{{ now() }}"
  json_attributes_path: "$.['children'][1]['standings']"
  json_attributes: 
   - entries

- platform: rest
  scan_interval: 36000
  name: soccer_mls_eastern_conference
  unique_id: sensor.soccer_mls_eastern_conference
  resource: https://site.web.api.espn.com/apis/v2/sports/soccer/usa.1/standings?seasontype=1&type=0&level=3
  value_template: "{{ now() }}"
  json_attributes_path: "$.['children'][0]['standings']"
  json_attributes: 
   - entries
# USA NWSL Conferences

- platform: rest
  scan_interval: 36000
  name: soccer_usanwsl
  unique_id: sensor.soccer_usanwsl
  resource: https://site.web.api.espn.com/apis/v2/sports/soccer/usa.nwsl/standings?seasontype=1&type=0&level=3
  value_template: "{{ now() }}"
  json_attributes_path: "$.[0]['standings']"
  json_attributes: 
   - entries
# Italian Serie A   

- platform: rest
  scan_interval: 36000
  name: soccer_italian_serie_a
  unique_id: sensor.soccer_italian_serie_a
  resource: https://site.web.api.espn.com/apis/v2/sports/soccer/ita.1/standings?seasontype=1&type=0&level=3
  value_template: "{{ now() }}"
  json_attributes_path: "$.[0]['standings']"
  json_attributes: 
   - entries   
# Mexican Liga BBVA MX

- platform: rest
  scan_interval: 36000
  name: soccer_mexican_liga_bbva
  unique_id: sensor.soccer_mexican_liga_bbva
  resource: https://site.web.api.espn.com/apis/v2/sports/soccer/mex.1/standings?seasontype=1&type=0&level=3
  value_template: "{{ now() }}"
  json_attributes_path: "$.[0]['standings']"
  json_attributes: 
   - entries 
# UEFA Champions League

- platform: rest
  scan_interval: 36000
  name: soccer_uefa_champions_league
  unique_id: sensor.soccer_uefa_champions_league
  resource: https://site.web.api.espn.com/apis/v2/sports/soccer/mex.1/standings?seasontype=1&type=0&level=3
  value_template: "{{ now() }}"
  json_attributes_path: "$.[0]['standings']"
  json_attributes: 
   - entries 

Post 2 Coming

and here is my sandbox that at least may get you started. Pre/Live/Post are just placeholders for now

decluttering_templates:
  soccer_standings:
    card:
      type: custom:flex-table-card
      title: '[[title]]'
      css:
        table+: 'padding: 0px; width: 100%; border-collapse: collapse; margin-top:12px;'
        tbody tr td:first-child: 'width: 1%;'
        tbody tr td:nth-child(2): 'width: 1%;'
        tbody tr td:nth-child(3): 'width: 3%;'
        tbody tr td:nth-child(n+4): 'width: 1%;'
        tbody tr td:nth-child(5): 'color: green;'
        tbody tr td:nth-child(6): 'color: yellow;'
        tbody tr td:nth-child(7): 'color: red;'
        tbody tr td:nth-child(10): 'background-color: green; color: white;'
        tbody tr:hover: 'background-color: dimgrey!important; color:white!important;'
        tbody tr:nth-child(4): 'border-bottom: 2px solid green!important;'
        tbody tr:nth-child(5): 'border-bottom: 2px solid dodgerblue!important;'
        tbody tr:nth-child(6): 'border-bottom: 2px solid dodgerblue!important;'
        tbody tr:nth-child(15): 'border-bottom: 2px solid yellow!important;'
        tbody tr:nth-child(16): 'border-bottom: 2px solid crimson!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;
             }
      sort_by:
        - entries+
      entities:
        include: '[[entity]]'
      columns:
        - name: Rank
          data: entries
          modify: >-
            if(typeof x.stats.find(y=>y.abbreviation == 'R')
            !=='undefined'){x.stats.find(y=>y.abbreviation ==
            'R').displayValue}else{'-'}                   
        - name: Team
          data: entries
          modify: |-
            if (typeof x.team.logos !== 'undefined')
              '<div><img src="' + x.team.logos[0].href + '" style="height:20px;vertical-align:middle;">&nbsp;' + x.team.displayName + '</div>'
            else
              '<div><span style="display: inline-block;width: 20px;"></span>&nbsp;' + x.team.displayName + '</div>'
        - name: Record
          data: entries
          hidden: false
          modify: >-
            if(typeof x.stats.find(y=>y.abbreviation == 'Total') !== 'undefined'
            ){x.stats.find(y=>y.abbreviation == 'Total').displayValue}else{'-'}
        - name: Wins
          data: entries
          hidden: false
          modify: >-
            if(typeof x.stats.find(y=>y.abbreviation == 'W') !== 'undefined'
            ){x.stats.find(y=>y.abbreviation == 'W').displayValue}else{'-'}
        - name: Losses
          data: entries
          modify: >-
            if(typeof x.stats.find(y=>y.abbreviation == 'L') !== 'undefined'
            ){x.stats.find(y=>y.abbreviation == 'L').displayValue}else{'-'}
        - name: Draws
          data: entries
          modify: >-
            if(typeof x.stats.find(y=>y.abbreviation == 'D') !== 'undefined'
            ){x.stats.find(y=>y.abbreviation == 'D').displayValue}else{'-'}
        - name: Points
          data: entries
          modify: >-
            if(typeof x.stats.find(y=>y.abbreviation == 'P') !== 'undefined'
            ){x.stats.find(y=>y.abbreviation == 'P').displayValue}else{'-'}
          align: center
  game_stats:
    card:
      type: custom:auto-entities
      unique: true
      show_empty: false
      card:
        type: custom:layout-card
        layout_type: grid
        layout:
          grid-template-columns: repeat(auto-fit, minmax(280px, 1fr))
      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 { font-size: .7em; line-height: .7em; width: 280px;}"},
                "home_side": "right"}}},
            {%- else -%}
              {{{"type": "custom:teamtracker-card",
                "entity": team,
                "card_mod": {"style": "ha-card { font-size: .7em; line-height: .7em; width: 280px;}"},
                "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
          styles:
            '--mdc-theme-primary': black
            '--mdc-tab-text-label-color-default': silver
            '--mdc-typography-button-font-size': 12px
          tabs:
            - attributes:
                label: Soccer
                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: Leagues
                        icon: mdi:football
                      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: 5%;
                              }
                              mwc-tab[active] {
                                background: white !important;
                                color: black !important;
                              }
                        card:
                          type: custom:tabbed-card
                          styles:
                            '--mdc-theme-primary': black
                            '--mdc-tab-text-label-color-default': silver
                            '--mdc-typography-button-font-size': 12px
                          tabs:
                            - attributes:
                                label: Premier Legue (EPL)
                                icon: mdi:account-group
                              card:
                                type: horizontal-stack
                                cards:
                                  - type: vertical-stack
                                    cards:
                                      - type: markdown
                                        content: |
                                          <h1>EPL Standings</h1>
                                      - type: custom:decluttering-card
                                        template: soccer_standings
                                        variables:
                                          - title: EPL Standings
                                          - entity: sensor.soccer_english_premier_league
                                          - attribute: entries
                                  - type: vertical-stack
                                    cards:
                                      - type: markdown
                                        content: >
                                          <h1>Pre,Live,Post EPL
                                          Games</h1>                            
                                      - type: markdown
                                        content: |
                                          <h1>EPL Games Live</h1>
                                      - type: custom:decluttering-card
                                        template: game_stats
                                        variables:
                                          - sport: EPL
                                          - sport_path: soccer
                                          - status: IN
                                      - type: markdown
                                        content: |
                                          <h1>EPL Games Coming-up</h1>
                                      - type: custom:decluttering-card
                                        template: game_stats
                                        variables:
                                          - sport: EPL
                                          - sport_path: soccer
                                          - status: PRE
                                      - type: markdown
                                        content: |
                                          <h1>EPL Games Completed</h1>
                                      - type: custom:decluttering-card
                                        template: game_stats
                                        variables:
                                          - sport: EPL
                                          - sport_path: soccer
                                          - status: POST
                            - attributes:
                                label: Championship League
                                icon: mdi:account-group
                              card:
                                type: horizontal-stack
                                cards:
                                  - type: vertical-stack
                                    cards:
                                      - type: markdown
                                        content: |
                                          <h1>Championship League Standings</h1>
                                      - type: custom:decluttering-card
                                        template: soccer_standings
                                        variables:
                                          - title: Championship League
                                          - entity: >-
                                              sensor.soccer_english_league_championship
                                          - attribute: entries
                                  - type: vertical-stack
                                    cards:
                                      - type: markdown
                                        content: >
                                          <h1>Pre,Live,Post Championship League
                                          Games</h1>
                                      - type: markdown
                                        content: |
                                          <h1>Championship Games Live</h1>
                                      - type: custom:decluttering-card
                                        template: game_stats
                                        variables:
                                          - sport: MLS
                                          - sport_path: soccer
                                          - status: IN
                                      - type: markdown
                                        content: |
                                          <h1>Championship Games Coming-up</h1>
                                      - type: custom:decluttering-card
                                        template: game_stats
                                        variables:
                                          - sport: MLS
                                          - sport_path: soccer
                                          - status: PRE
                                      - type: markdown
                                        content: |
                                          <h1>Championship Games Completed</h1>
                                      - type: custom:decluttering-card
                                        template: game_stats
                                        variables:
                                          - sport: MLS
                                          - sport_path: soccer
                                          - status: POST
                            - attributes:
                                label: English League 1
                                icon: mdi:account-group
                              card:
                                type: horizontal-stack
                                cards:
                                  - type: vertical-stack
                                    cards:
                                      - type: markdown
                                        content: |
                                          <h1>English League 1 Standings</h1>
                                      - type: custom:decluttering-card
                                        template: soccer_standings
                                        variables:
                                          - title: English League 1 Standings
                                          - entity: sensor.soccer_english_league_one
                                          - attribute: entries
                                  - type: vertical-stack
                                    cards:
                                      - type: markdown
                                        content: >
                                          <h1>Pre,Live,Post English League 1
                                          Games</h1>
                                      - type: markdown
                                        content: |
                                          <h1>English League 1 Games Live</h1>
                                      - type: custom:decluttering-card
                                        template: game_stats
                                        variables:
                                          - sport: MLS
                                          - sport_path: soccer
                                          - status: IN
                                      - type: markdown
                                        content: >
                                          <h1>English League 1 Games
                                          Coming-up</h1>
                                      - type: custom:decluttering-card
                                        template: game_stats
                                        variables:
                                          - sport: MLS
                                          - sport_path: soccer
                                          - status: PRE
                                      - type: markdown
                                        content: >
                                          <h1>English League 1 Games
                                          Completed</h1>
                                      - type: custom:decluttering-card
                                        template: game_stats
                                        variables:
                                          - sport: MLS
                                          - sport_path: soccer
                                          - status: POST
                            - attributes:
                                label: English League 2
                                icon: mdi:account-group
                              card:
                                type: horizontal-stack
                                cards:
                                  - type: vertical-stack
                                    cards:
                                      - type: markdown
                                        content: |
                                          <h1>English League 2 Standings</h1>
                                      - type: custom:decluttering-card
                                        template: soccer_standings
                                        variables:
                                          - title: English League 2 Standings
                                          - entity: sensor.soccer_english_league_two
                                          - attribute: entries
                                  - type: vertical-stack
                                    cards:
                                      - type: markdown
                                        content: >
                                          <h1>Pre,Live,Post English League 2
                                          Games</h1>
                                      - type: markdown
                                        content: |
                                          <h1>English League 2 Games Live</h1>
                                      - type: custom:decluttering-card
                                        template: game_stats
                                        variables:
                                          - sport: MLS
                                          - sport_path: soccer
                                          - status: IN
                                      - type: markdown
                                        content: >
                                          <h1>English League 2 Games
                                          Coming-up</h1>
                                      - type: custom:decluttering-card
                                        template: game_stats
                                        variables:
                                          - sport: MLS
                                          - sport_path: soccer
                                          - status: PRE
                                      - type: markdown
                                        content: >
                                          <h1>English League 2 Games
                                          Completed</h1>
                                      - type: custom:decluttering-card
                                        template: game_stats
                                        variables:
                                          - sport: MLS
                                          - sport_path: soccer
                                          - status: POST
                            - attributes:
                                label: English National League
                                icon: mdi:account-group
                              card:
                                type: horizontal-stack
                                cards:
                                  - type: vertical-stack
                                    cards:
                                      - type: markdown
                                        content: >
                                          <h1>English National League
                                          Standings</h1>
                                      - type: custom:decluttering-card
                                        template: soccer_standings
                                        variables:
                                          - title: English National League Standings
                                          - entity: sensor.soccer_english_national_league
                                          - attribute: entries
                            - attributes:
                                label: Bundesliga
                                icon: mdi:account-group
                              card:
                                type: horizontal-stack
                                cards:
                                  - type: vertical-stack
                                    cards:
                                      - type: markdown
                                        content: |
                                          <h1>BundesligaStandings</h1>
                                      - type: custom:decluttering-card
                                        template: soccer_standings
                                        variables:
                                          - title: Bundesliga Standings
                                          - entity: sensor.soccer_bundesliga
                                          - attribute: entries                              
                            - attributes:
                                label: Bundesliga 2
                                icon: mdi:account-group
                              card:
                                type: horizontal-stack
                                cards:
                                  - type: vertical-stack
                                    cards:
                                      - type: markdown
                                        content: |
                                          <h1>BundesligaStandings</h1>
                                      - type: custom:decluttering-card
                                        template: soccer_standings
                                        variables:
                                          - title: Bundesliga.2 Standings
                                          - entity: sensor.soccer_bundesliga_two
                                          - attribute: entries
                            - attributes:
                                label: MLS
                                icon: mdi:account-group
                              card:
                                type: horizontal-stack
                                cards:
                                  - type: vertical-stack
                                    cards:
                                      - type: markdown
                                        content: |
                                          <h1>MLS Standings</h1>
                                      - type: custom:decluttering-card
                                        template: soccer_standings
                                        variables:
                                          - title: MLS Western Conference Standings
                                          - entity: sensor.soccer_mls_western_conference
                                          - attribute: entries
                                      - type: custom:decluttering-card
                                        template: soccer_standings
                                        variables:
                                          - title: MLS Eastern Conference Standings
                                          - entity: sensor.soccer_mls_eastern_conference
                                          - attribute: entries
                                  - type: vertical-stack
                                    cards:
                                      - type: markdown
                                        content: |
                                          <h1>Pre,Live,Post MLS Games</h1>
                                      - type: markdown
                                        content: |
                                          <h1>EPL Games Live</h1>
                                      - type: custom:decluttering-card
                                        template: game_stats
                                        variables:
                                          - sport: MLS
                                          - sport_path: soccer
                                          - status: IN
                                      - type: markdown
                                        content: |
                                          <h1>EPL Games Coming-up</h1>
                                      - type: custom:decluttering-card
                                        template: game_stats
                                        variables:
                                          - sport: MLS
                                          - sport_path: soccer
                                          - status: PRE
                                      - type: markdown
                                        content: |
                                          <h1>EPL Games Completed</h1>
                                      - type: custom:decluttering-card
                                        template: game_stats
                                        variables:
                                          - sport: MLS
                                          - sport_path: soccer
                                          - status: POST
                            - attributes:
                                label: USA NWSL
                                icon: mdi:account-group
                              card:
                                type: horizontal-stack
                                cards:
                                  - type: vertical-stack
                                    cards:
                                      - type: markdown
                                        content: |
                                          <h1>USA NWSL Standings</h1>
                                      - type: custom:decluttering-card
                                        template: soccer_standings
                                        variables:
                                          - title: MLS Western Conference Standings
                                          - entity: sensor.soccer_usanwsl
                                          - attribute: entries
                                  - type: vertical-stack
                                    cards:
                                      - type: markdown
                                        content: |
                                          <h1>Pre,Live,Post USA NWSL  Games</h1>
                                      - type: markdown
                                        content: |
                                          <h1>USA NWSL  Games Live</h1>
                                      - type: custom:decluttering-card
                                        template: game_stats
                                        variables:
                                          - sport: MLS
                                          - sport_path: soccer
                                          - status: IN
                                      - type: markdown
                                        content: |
                                          <h1>USA NWSL  Games Coming-up</h1>
                                      - type: custom:decluttering-card
                                        template: game_stats
                                        variables:
                                          - sport: MLS
                                          - sport_path: soccer
                                          - status: PRE
                                      - type: markdown
                                        content: |
                                          <h1>USA NWSL  Games Completed</h1>
                                      - type: custom:decluttering-card
                                        template: game_stats
                                        variables:
                                          - sport: MLS
                                          - sport_path: soccer
                                          - status: POST
title: Soccer Sports Standings and Scores


Update 2: Watching the Georgia/Texas Game and got interested in adding to soccer. Formatting/TeamTracker/etc. are in the block of clay on the wheel right now, but figured I would toss the update out there. Picture shows the add-remember no teamtracker yet (not sure if some of these leagues even have them.
You will see I have other leagues in the soccer_sensors.yaml but I haven’t added them yet. I am also playing around with F1 Racing but not looking like a lot of daa there

@hillshome This reply is likely more than you wanted. I’ll share it as someone else may want one of these leagues.

As @bburwell mentioned, I do have most of these sensors, templates and dashboards created. Please note that my sensors are based on rest and template vs. the updated method shared above. As long as you update the entity and sensor naming for your requirements, either method should work.

within sensor.yaml

##
##  English League One
##
- platform: rest
  scan_interval: 36000
  name: english_league_one_standings
  unique_id: sensor.english_league_one_standings
  resource: https://site.web.api.espn.com/apis/v2/sports/soccer/eng.3/standings?seasontype=1&type=0&level=3
  value_template: "{{ now() }}"
  json_attributes:
    - children
##
##  English League Championship
##
- platform: rest
  scan_interval: 36000
  name: english_league_championship_standings
  unique_id: sensor.english_league_championship_standings
  resource: https://site.web.api.espn.com/apis/v2/sports/soccer/eng.2/standings?seasontype=1&type=0&level=3
  value_template: "{{ now() }}"
  json_attributes:
    - children
##
##  English Premier League
##
- platform: rest
  scan_interval: 36000
  name: english_premier_league_standings
  unique_id: sensor.english_premier_league_standings
  resource: https://site.web.api.espn.com/apis/v2/sports/soccer/eng.1/standings?seasontype=1&type=0&level=3
  value_template: "{{ now() }}"
  json_attributes:
    - children
##
##  Italian Serie A
##
- platform: rest
  scan_interval: 36000
  name: italian_serie_a_standings
  unique_id: sensor.italian_serie_a_standings
  resource: https://site.web.api.espn.com/apis/v2/sports/soccer/ita.1/standings?seasontype=1&type=0&level=3
  value_template: "{{ now() }}"
  json_attributes:
    - children
##
##  Spanish LALIGA
##
- platform: rest
  scan_interval: 36000
  name: spanish_laliga_standings
  unique_id: sensor.spanish_laliga_standings
  resource: https://site.web.api.espn.com/apis/v2/sports/soccer/esp.1/standings?seasontype=1&type=0&level=3
  value_template: "{{ now() }}"
  json_attributes:
    - children
##
##  German Bundesliga
##
- platform: rest
  scan_interval: 36000
  name: german_bundesliga_standings
  unique_id: sensor.german_bundesliga_standings
  resource: https://site.web.api.espn.com/apis/v2/sports/soccer/ger.1/standings?seasontype=1&type=0&level=3
  value_template: "{{ now() }}"
  json_attributes:
    - children
##
##  French Ligue 1 
##
- platform: rest
  scan_interval: 36000
  name: french_ligue_1_standings
  unique_id: sensor.french_ligue_1_standings
  resource: https://site.web.api.espn.com/apis/v2/sports/soccer/fra.1/standings?seasontype=1&type=0&level=3
  value_template: "{{ now() }}"
  json_attributes:
    - children
##
##  UEFA Champions League
##
- platform: rest
  scan_interval: 36000
  name: uefa_champions_league_standings
  unique_id: sensor.uefa_champions_league_standings
  resource: https://site.web.api.espn.com/apis/v2/sports/soccer/uefa.champions/standings?seasontype=1&type=0&level=3
  value_template: "{{ now() }}"
  json_attributes:
    - children

within template.yaml

  ##
  ##  English League One Table
  ##
  - name: english_league_one
    unique_id: sensor.english_league_one
    state: "{{ now() }}"
    attributes:
      entries: >-
        {{ state_attr('sensor.english_league_one_standings','children')[0]['standings']['entries'] }}
  ##
  ##  English League Championship Table
  ##
  - name: english_league_championship
    unique_id: sensor.english_league_championship
    state: "{{ now() }}"
    attributes:
      entries: >-
        {{ state_attr('sensor.english_league_championship_standings','children')[0]['standings']['entries'] }}
  ##
  ##  English Premier League Table
  ##
  - name: english_premier_league
    unique_id: sensor.english_premier_league
    state: "{{ now() }}"
    attributes:
      entries: >-
        {{ state_attr('sensor.english_premier_league_standings','children')[0]['standings']['entries'] }}
  ##
  ##  Italian Serie A Table
  ##
  - name: italian_serie_a
    unique_id: sensor.italian_serie_a
    state: "{{ now() }}"
    attributes:
      entries: >-
        {{ state_attr('sensor.italian_serie_a_standings','children')[0]['standings']['entries'] }}
  ##
  ##  Spanish LALIGA Table
  ##
  - name: spanish_laliga
    unique_id: sensor.spanish_laliga
    state: "{{ now() }}"
    attributes:
      entries: >-
        {{ state_attr('sensor.spanish_laliga_standings','children')[0]['standings']['entries'] }}
  ##
  ##  German Bundesliga Table
  ##
  - name: german_bundesliga
    unique_id: sensor.german_bundesliga
    state: "{{ now() }}"
    attributes:
      entries: >-
        {{ state_attr('sensor.german_bundesliga_standings','children')[0]['standings']['entries'] }}
  ##
  ##  French Ligue 1 Table
  ##
  - name: french_ligue_1
    unique_id: sensor.french_ligue_1
    state: "{{ now() }}"
    attributes:
      entries: >-
        {{ state_attr('sensor.french_ligue_1_standings','children')[0]['standings']['entries'] }}
  ##
  ##  UEFA Champions Table
  ##
  - name: uefa_champions_league
    unique_id: sensor.uefa.champions_league
    state: "{{ now() }}"
    attributes:
      entries: >-
        {{ state_attr('sensor.uefa_champions_league_standings','children')[0]['standings']['entries'] }}
  

Dashboard part 1 (EFL Championship and League One lines for promotion/demotion) (All others demotion and Champions League)

decluttering_templates:
  eflp_settings:
    card:
      type: custom:flex-table-card
      title: '[[title]]'
      css:
        table+: 'padding: 0px; width: 100%; border-collapse: collapse;'
        tbody tr td:first-child: 'width: 1%;'
        tbody tr td:nth-child(2): 'width: 7%;'
        tbody tr td:nth-child(n+3): 'width: 3%;'
        tbody tr:hover: 'background-color: dimgrey!important; color:white!important;'
        tbody tr:nth-child(4): 'border-bottom: 1px solid dodgerblue!important;'
        tbody tr:nth-child(17): 'border-bottom: 1px solid crimson!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: entries-
      columns:
        - hidden: true
          data: entries
        - name: <div>Rank</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'R').displayValue
        - name: <div>Team</div>
          data: entries
          modify: |-
            if (typeof x.team.links !== 'undefined')
              '<div>&nbsp;<a href="' + x.team.links[0].href + 
              '" target="_blank"><img src="' + x.team.logos[0].href + 
              '" style="height:20px;vertical-align:middle;"></a>&nbsp;&nbsp;&nbsp;' + 
              x.team.displayName + '</div>'
            else
              '<div>' + x.team.displayName + '</div>'      
        - name: <div>Matches Played</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'GP').displayValue
        - name: <div>Wins</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'W').displayValue
        - name: <div>Draws</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'D').displayValue
        - name: <div>Losses</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'L').displayValue
        - name: <div>Points</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'P').displayValue
        - name: <div>Goals For</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'F').displayValue
        - name: <div>Goals Against</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'A').displayValue
        - name: <div>Difference</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'GD').displayValue
        - name: <div>Overall</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'Total').displayValue
  eflc_settings:
    card:
      type: custom:flex-table-card
      title: '[[title]]'
      css:
        table+: 'padding: 0px; width: 100%; border-collapse: collapse; margin-top:12px;'
        tbody tr td:first-child: 'width: 1%;'
        tbody tr td:nth-child(2): 'width: 7%;'
        tbody tr td:nth-child(n+3): 'width: 3%;'
        tbody tr:hover: 'background-color: dimgrey!important; color:white!important;'
        tbody tr:nth-child(2): 'border-bottom: 1px solid dodgerblue!important;'
        tbody tr:nth-child(6): 'border-bottom: .5px dashed lightgrey!important;'
        tbody tr:nth-child(21): 'border-bottom: 1px solid crimson!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: entries-
      columns:
        - hidden: true
          data: entries
        - name: <div>Rank</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'R').displayValue
        - name: <div>Team</div>
          data: entries
          modify: |-
            if (typeof x.team.links !== 'undefined')
              '<div>&nbsp;<a href="' + x.team.links[0].href + 
              '" target="_blank"><img src="' + x.team.logos[0].href + 
              '" style="height:20px;vertical-align:middle;"></a>&nbsp;&nbsp;&nbsp;' + 
              x.team.displayName + '</div>'
            else
              '<div>' + x.team.displayName + '</div>'      
        - name: <div>Matches Played</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'GP').displayValue
        - name: <div>Wins</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'W').displayValue
        - name: <div>Draws</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'D').displayValue
        - name: <div>Losses</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'L').displayValue
        - name: <div>Points</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'P').displayValue
        - name: <div>Goals For</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'F').displayValue
        - name: <div>Goals Against</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'A').displayValue
        - name: <div>Difference</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'GD').displayValue
        - name: <div>Overall</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'Total').displayValue
  efl1_settings:
    card:
      type: custom:flex-table-card
      title: '[[title]]'
      css:
        table+: 'padding: 0px; width: 100%; border-collapse: collapse; margin-top:12px;'
        tbody tr td:first-child: 'width: 1%;'
        tbody tr td:nth-child(2): 'width: 7%;'
        tbody tr td:nth-child(n+3): 'width: 3%;'
        tbody tr:hover: 'background-color: dimgrey!important; color:white!important;'
        tbody tr:nth-child(2): 'border-bottom: 1px solid dodgerblue!important;'
        tbody tr:nth-child(6): 'border-bottom: .5px dashed lightgrey!important;'
        tbody tr:nth-child(20): 'border-bottom: 1px solid crimson!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: entries-
      columns:
        - hidden: true
          data: entries
        - name: <div>Rank</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'R').displayValue
        - name: <div>Team</div>
          data: entries
          modify: |-
            if (typeof x.team.links !== 'undefined')
              '<div>&nbsp;<a href="' + x.team.links[0].href + 
              '" target="_blank"><img src="' + x.team.logos[0].href + 
              '" style="height:20px;vertical-align:middle;"></a>&nbsp;&nbsp;&nbsp;' + 
              x.team.displayName + '</div>'
            else
              '<div>' + x.team.displayName + '</div>'      
        - name: <div>Matches Played</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'GP').displayValue
        - name: <div>Wins</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'W').displayValue
        - name: <div>Draws</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'D').displayValue
        - name: <div>Losses</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'L').displayValue
        - name: <div>Points</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'P').displayValue
        - name: <div>Goals For</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'F').displayValue
        - name: <div>Goals Against</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'A').displayValue
        - name: <div>Difference</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'GD').displayValue
        - name: <div>Overall</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'Total').displayValue
  uefa_settings:
    card:
      type: custom:flex-table-card
      title: '[[title]]'
      css:
        table+: 'padding: 0px; width: 100%; border-collapse: collapse; margin-top:12px;'
        tbody tr td:first-child: 'width: 1%;'
        tbody tr td:nth-child(2): 'width: 7%;'
        tbody tr td:nth-child(n+3): 'width: 3%;'
        tbody tr:hover: 'background-color: dimgrey!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: entries-
      columns:
        - hidden: <div>Points</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'P').displayValue
        - name: <div>Rank</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'R').displayValue
        - name: <div>Team</div>
          data: entries
          modify: |-
            if (typeof x.team.links !== 'undefined')
              '<div>&nbsp;<a href="' + x.team.links[0].href + 
              '" target="_blank"><img src="' + x.team.logos[0].href + 
              '" style="height:20px;vertical-align:middle;"></a>&nbsp;&nbsp;&nbsp;' + 
              x.team.displayName + '</div>'
            else
              '<div>' + x.team.displayName + '</div>'      
        - name: <div>Matches Played</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'GP').displayValue
        - name: <div>Wins</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'W').displayValue
        - name: <div>Draws</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'D').displayValue
        - name: <div>Losses</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'L').displayValue
        - name: <div>Points</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'P').displayValue
        - name: <div>Goals For</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'F').displayValue
        - name: <div>Goals Against</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'A').displayValue
        - name: <div>Difference</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'GD').displayValue
        - name: <div>Overall</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'Total').displayValue
  liga_settings:
    card:
      type: custom:flex-table-card
      title: '[[title]]'
      css:
        table+: 'padding: 0px; width: 100%; border-collapse: collapse; margin-top:12px;'
        tbody tr td:first-child: 'width: 1%;'
        tbody tr td:nth-child(2): 'width: 7%;'
        tbody tr td:nth-child(n+3): 'width: 3%;'
        tbody tr:hover: 'background-color: dimgrey!important; color:white!important;'
        tbody tr:nth-child(4): 'border-bottom: 1px solid dodgerblue!important;'
        tbody tr:nth-child(17): 'border-bottom: 1px solid crimson!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: entries-
      columns:
        - hidden: true
          data: entries
        - name: <div>Rank</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'R').displayValue
        - name: <div>Team</div>
          data: entries
          modify: |-
            if (typeof x.team.links !== 'undefined')
              '<div>&nbsp;<a href="' + x.team.links[0].href + 
              '" target="_blank"><img src="' + x.team.logos[0].href + 
              '" style="height:20px;vertical-align:middle;"></a>&nbsp;&nbsp;&nbsp;' + 
              x.team.displayName + '</div>'
            else
              '<div>' + x.team.displayName + '</div>'      
        - name: <div>Matches Played</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'GP').displayValue
        - name: <div>Wins</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'W').displayValue
        - name: <div>Draws</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'D').displayValue
        - name: <div>Losses</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'L').displayValue
        - name: <div>Points</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'P').displayValue
        - name: <div>Goals For</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'F').displayValue
        - name: <div>Goals Against</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'A').displayValue
        - name: <div>Difference</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'GD').displayValue
        - name: <div>Overall</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'Total').displayValue
  seriea_settings:
    card:
      type: custom:flex-table-card
      title: '[[title]]'
      css:
        table+: 'padding: 0px; width: 100%; border-collapse: collapse; margin-top:12px;'
        tbody tr td:first-child: 'width: 1%;'
        tbody tr td:nth-child(2): 'width: 9%;'
        tbody tr td:nth-child(n+3): 'width: 3%;'
        tbody tr:hover: 'background-color: dimgrey!important; color:white!important;'
        tbody tr:nth-child(5): 'border-bottom: 1px solid dodgerblue!important;'
        tbody tr:nth-child(17): 'border-bottom: 1px solid crimson!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: entries-
      columns:
        - hidden: true
          data: entries
        - name: <div>Rank</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'R').displayValue
        - name: <div>Team</div>
          data: entries
          modify: |-
            if (typeof x.team.links !== 'undefined')
              '<div>&nbsp;<a href="' + x.team.links[0].href + 
              '" target="_blank"><img src="' + x.team.logos[0].href + 
              '" style="height:20px;vertical-align:middle;"></a>&nbsp;&nbsp;&nbsp;' + 
              x.team.displayName + '</div>'
            else
              '<div>' + x.team.displayName + '</div>'      
        - name: <div>Matches Played</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'GP').displayValue
        - name: <div>Wins</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'W').displayValue
        - name: <div>Draws</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'D').displayValue
        - name: <div>Losses</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'L').displayValue
        - name: <div>Points</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'P').displayValue
        - name: <div>Goals For</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'F').displayValue
        - name: <div>Goals Against</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'A').displayValue
        - name: <div>Difference</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'GD').displayValue
        - name: <div>Overall</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'Total').displayValue
  bundesliga_settings:
    card:
      type: custom:flex-table-card
      title: '[[title]]'
      css:
        table+: 'padding: 0px; width: 100%; border-collapse: collapse; margin-top:12px;'
        tbody tr td:first-child: 'width: 1%;'
        tbody tr td:nth-child(2): 'width: 9%;'
        tbody tr td:nth-child(n+3): 'width: 3%;'
        tbody tr:hover: 'background-color: dimgrey!important; color:white!important;'
        tbody tr:nth-child(4): 'border-bottom: 1px solid dodgerblue!important;'
        tbody tr:nth-child(16): 'border-bottom: 1px solid crimson!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: entries-
      columns:
        - hidden: true
          data: entries
        - name: <div>Rank</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'R').displayValue
        - name: <div>Team</div>
          data: entries
          modify: |-
            if (typeof x.team.links !== 'undefined')
              '<div>&nbsp;<a href="' + x.team.links[0].href + 
              '" target="_blank"><img src="' + x.team.logos[0].href + 
              '" style="height:20px;vertical-align:middle;"></a>&nbsp;&nbsp;&nbsp;' + 
              x.team.displayName + '</div>'
            else
              '<div>' + x.team.displayName + '</div>'      
        - name: <div>Matches Played</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'GP').displayValue
        - name: <div>Wins</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'W').displayValue
        - name: <div>Draws</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'D').displayValue
        - name: <div>Losses</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'L').displayValue
        - name: <div>Points</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'P').displayValue
        - name: <div>Goals For</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'F').displayValue
        - name: <div>Goals Against</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'A').displayValue
        - name: <div>Difference</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'GD').displayValue
        - name: <div>Overall</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'Total').displayValue
  ligue1_settings:
    card:
      type: custom:flex-table-card
      title: '[[title]]'
      css:
        table+: 'padding: 0px; width: 100%; border-collapse: collapse; margin-top:12px;'
        tbody tr td:first-child: 'width: 1%;'
        tbody tr td:nth-child(2): 'width: 9%;'
        tbody tr td:nth-child(n+3): 'width: 3%;'
        tbody tr:hover: 'background-color: dimgrey!important; color:white!important;'
        tbody tr:nth-child(3): 'border-bottom: 1px solid dodgerblue!important;'
        tbody tr:nth-child(16): 'border-bottom: 1px solid crimson!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: entries-
      columns:
        - hidden: true
          data: entries
        - name: <div>Rank</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'R').displayValue
        - name: <div>Team</div>
          data: entries
          modify: |-
            if (typeof x.team.links !== 'undefined')
              '<div>&nbsp;<a href="' + x.team.links[0].href + 
              '" target="_blank"><img src="' + x.team.logos[0].href + 
              '" style="height:20px;vertical-align:middle;"></a>&nbsp;&nbsp;&nbsp;' + 
              x.team.displayName + '</div>'
            else
              '<div>' + x.team.displayName + '</div>'      
        - name: <div>Matches Played</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'GP').displayValue
        - name: <div>Wins</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'W').displayValue
        - name: <div>Draws</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'D').displayValue
        - name: <div>Losses</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'L').displayValue
        - name: <div>Points</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'P').displayValue
        - name: <div>Goals For</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'F').displayValue
        - name: <div>Goals Against</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'A').displayValue
        - name: <div>Difference</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'GD').displayValue
        - name: <div>Overall</div>
          data: entries
          modify: x.stats.find(y=>y.abbreviation == 'Total').displayValue

Sample image

Dashboard part 2 (Views)

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: black;
                border-width: 2.5px;
                border-top-left-radius: 20px;
                border-top-right-radius: 20px;
                border-style: solid;
                overflow: hidden;
                width: 12%;
              }
              mwc-tab[active] {
                background: silver !important;
              }
        card:
          type: custom:tabbed-card
          styles:
            '--mdc-theme-primary': black
            '--mdc-tab-text-label-color-default': silver
            '--mdc-typography-button-font-size': 12px
          tabs:    
            - attributes:
                label: UEFA
                icon: mdi:soccer
              card:
                type: custom:mod-card
                card_mod:
                  style:
                    tabbed-card $: |
                      mwc-tab {
                        background: var(--ha-card-background, var(--card-background-color, white) );
                        border-color: black;
                        border-width: 2.5px;
                        border-top-left-radius: 20px;
                        border-top-right-radius: 20px;
                        border-style: solid;
                        overflow: hidden;
                        width: 12%;
                      }
                      mwc-tab[active] {
                        background: silver !important;
                      }            
                card:
                  type: custom:tabbed-card
                  styles:
                    '--mdc-theme-primary': black
                    '--mdc-tab-text-label-color-default': silver
                    '--mdc-typography-button-font-size': 12px
                  tabs:
                    - attributes:
                        label: EFL
                        icon: mdi:soccer
                      card:
                        type: custom:mod-card
                        card_mod:
                          style:
                            tabbed-card $: |
                              mwc-tab {
                                background: var(--ha-card-background, var(--card-background-color, white) );
                                border-color: black;
                                border-width: 2.5px;
                                border-top-left-radius: 20px;
                                border-top-right-radius: 20px;
                                border-style: solid;
                                overflow: hidden;
                                width: 16%;
                              }
                              mwc-tab[active] {
                                background: #283270 !important;
                              }                           
                        card:
                          type: custom:tabbed-card
                          styles:
                            '--mdc-theme-primary': white
                            '--mdc-tab-text-label-color-default': silver
                            '--mdc-typography-button-font-size': 12px
                          tabs:
                            - attributes:
                                label: Premier League
                                icon: mdi:soccer
                              card:
                                type: custom:mod-card
                                card_mod:
                                  style:
                                    tabbed-card $: |
                                      mwc-tab {
                                        background: var(--ha-card-background, var(--card-background-color, white) );
                                        border-color: black;
                                        border-width: 2.5px;
                                        border-top-left-radius: 20px;
                                        border-top-right-radius: 20px;
                                        border-style: solid;
                                        overflow: hidden;
                                        width: 16%;
                                      }
                                      mwc-tab[active] {
                                        background: #283270 !important;
                                      }
                                card:
                                  type: custom:tabbed-card
                                  styles:
                                    '--mdc-theme-primary': white
                                    '--mdc-tab-text-label-color-default': silver
                                    '--mdc-typography-button-font-size': 12px
                                  tabs:
                                    - attributes:
                                        label: Table
                                        icon: mdi:ballot
                                      card:
                                        type: custom:decluttering-card
                                        template: eflp_settings
                                        variables:
                                          - title: League
                                          - entity: sensor.english_premier_league
                                          - attribute: entries
                                          - sort: >-
                                              x.stats.find(y=>y.shortDisplayName ==
                                              'PTS').value
                                    - attributes:
                                        label: Pre-Match
                                        icon: mdi:soccer-field
                                      card:
                                        type: custom:decluttering-card
                                        template: game_stats
                                        variables:
                                          - sport: EPL
                                          - status: PRE
                                    - attributes:
                                        label: Live
                                        icon: mdi:soccer
                                      card:
                                        type: custom:decluttering-card
                                        template: game_stats
                                        variables:
                                          - sport: EPL
                                          - status: IN
                                    - attributes:
                                        label: Post-Match
                                        icon: mdi:blood-bag
                                      card:
                                        type: custom:decluttering-card
                                        template: game_stats
                                        variables:
                                          - sport: EPL
                                          - status: POST
                            - attributes:
                                label: Championship
                                icon: mdi:soccer
                              card:
                                type: custom:mod-card
                                card_mod:
                                  style:
                                    tabbed-card $: |
                                      mwc-tab {
                                        background: var(--ha-card-background, var(--card-background-color, white) );
                                        border-color: black;
                                        border-width: 2.5px;
                                        border-top-left-radius: 20px;
                                        border-top-right-radius: 20px;
                                        border-style: solid;
                                        overflow: hidden;
                                        width: 16%;
                                      }
                                      mwc-tab[active] {
                                        background: #283270 !important;
                                      }
                                card:
                                  type: custom:tabbed-card
                                  styles:
                                    '--mdc-theme-primary': white
                                    '--mdc-tab-text-label-color-default': silver
                                    '--mdc-typography-button-font-size': 12px
                                  tabs:
                                    - attributes:
                                        label: Table
                                        icon: mdi:ballot
                                      card:
                                        type: custom:decluttering-card
                                        template: eflc_settings
                                        variables:
                                          - title: League
                                          - entity: sensor.english_league_championship
                                          - attribute: entries
                                          - sort: >-
                                              x.stats.find(y=>y.shortDisplayName ==
                                              'PTS').value
                                    - attributes:
                                        label: Pre-Match
                                        icon: mdi:soccer-field
                                      card:
                                        type: custom:decluttering-card
                                        template: game_stats
                                        variables:
                                          - sport: XXX
                                          - status: PRE
                                    - attributes:
                                        label: Live
                                        icon: mdi:soccer
                                      card:
                                        type: custom:decluttering-card
                                        template: game_stats
                                        variables:
                                          - sport: XXX
                                          - status: IN
                                    - attributes:
                                        label: Post-Match
                                        icon: mdi:blood-bag
                                      card:
                                        type: custom:decluttering-card
                                        template: game_stats
                                        variables:
                                          - sport: XXX
                                          - status: POST
                            - attributes:
                                label: League One
                                icon: mdi:soccer
                              card:
                                type: custom:mod-card
                                card_mod:
                                  style:
                                    tabbed-card $: |
                                      mwc-tab {
                                        background: var(--ha-card-background, var(--card-background-color, white) );
                                        border-color: black;
                                        border-width: 2.5px;
                                        border-top-left-radius: 20px;
                                        border-top-right-radius: 20px;
                                        border-style: solid;
                                        overflow: hidden;
                                        width: 16%;
                                      }
                                      mwc-tab[active] {
                                        background: #283270 !important;
                                      }
                                card:
                                  type: custom:tabbed-card
                                  styles:
                                    '--mdc-theme-primary': white
                                    '--mdc-tab-text-label-color-default': silver
                                    '--mdc-typography-button-font-size': 12px
                                  tabs:
                                    - attributes:
                                        label: Table
                                        icon: mdi:ballot
                                      card:
                                        type: custom:decluttering-card
                                        template: efl1_settings
                                        variables:
                                          - title: League
                                          - entity: sensor.english_league_one
                                          - attribute: entries
                                          - sort: >-
                                              x.stats.find(y=>y.shortDisplayName ==
                                              'PTS').value
                                    - attributes:
                                        label: Pre-Match
                                        icon: mdi:soccer-field
                                      card:
                                        type: custom:decluttering-card
                                        template: game_stats
                                        variables:
                                          - sport: XXX
                                          - status: PRE
                                    - attributes:
                                        label: Live
                                        icon: mdi:soccer
                                      card:
                                        type: custom:decluttering-card
                                        template: game_stats
                                        variables:
                                          - sport: XXX
                                          - status: IN
                                    - attributes:
                                        label: Post-Match
                                        icon: mdi:blood-bag
                                      card:
                                        type: custom:decluttering-card
                                        template: game_stats
                                        variables:
                                          - sport: XXX
                                          - status: POST
                    - attributes:
                        label: Serie A
                        icon: mdi:soccer
                      card:
                        type: custom:mod-card
                        card_mod:
                          style:
                            tabbed-card $: |
                              mwc-tab {
                                background: var(--ha-card-background, var(--card-background-color, white) );
                                border-color: black;
                                border-width: 2.5px;
                                border-top-left-radius: 20px;
                                border-top-right-radius: 20px;
                                border-style: solid;
                                overflow: hidden;
                                width: 16%;
                              }
                              mwc-tab[active] {
                                background: #0578FF !important;
                              }
                        card:
                          type: custom:tabbed-card
                          styles:
                            '--mdc-theme-primary': white
                            '--mdc-tab-text-label-color-default': silver
                            '--mdc-typography-button-font-size': 12px
                          tabs:
                            - attributes:
                                label: Table
                                icon: mdi:ballot
                              card:
                                type: custom:decluttering-card
                                template: seriea_settings
                                variables:
                                  - title: League
                                  - entity: sensor.italian_serie_a
                                  - attribute: entries
                                  - sort: >-
                                      x.stats.find(y=>y.shortDisplayName ==
                                      'PTS').value
                            - attributes:
                                label: Pre-Match
                                icon: mdi:soccer-field
                              card:
                                type: custom:decluttering-card
                                template: game_stats
                                variables:
                                  - sport: SERA
                                  - status: PRE
                            - attributes:
                                label: Live
                                icon: mdi:soccer
                              card:
                                type: custom:decluttering-card
                                template: game_stats
                                variables:
                                  - sport: SERA
                                  - status: IN
                            - attributes:
                                label: Post-Match
                                icon: mdi:blood-bag
                              card:
                                type: custom:decluttering-card
                                template: game_stats
                                variables:
                                  - sport: SERA
                                  - status: POST
                    - attributes:
                        label: LALIGA
                        icon: mdi:soccer
                      card:
                        type: custom:mod-card
                        card_mod:
                          style:
                            tabbed-card $: |
                              mwc-tab {
                                background: var(--ha-card-background, var(--card-background-color, white) );
                                border-color: black;
                                border-width: 2.5px;
                                border-top-left-radius: 20px;
                                border-top-right-radius: 20px;
                                border-style: solid;
                                overflow: hidden;
                                width: 16%;
                              }
                              mwc-tab[active] {
                                background: #FF4B44 !important;
                              }
                        card:
                          type: custom:tabbed-card
                          styles:
                            '--mdc-theme-primary': white
                            '--mdc-tab-text-label-color-default': silver
                            '--mdc-typography-button-font-size': 12px
                          tabs:
                            - attributes:
                                label: Table
                                icon: mdi:ballot
                              card:
                                type: custom:decluttering-card
                                template: liga_settings
                                variables:
                                  - title: League
                                  - entity: sensor.spanish_laliga
                                  - attribute: entries
                                  - sort: >-
                                      x.stats.find(y=>y.shortDisplayName ==
                                      'PTS').value          
                            - attributes:
                                label: Pre-Match
                                icon: mdi:soccer-field
                              card:
                                type: custom:decluttering-card
                                template: game_stats
                                variables:
                                  - sport: LIGA
                                  - status: PRE
                            - attributes:
                                label: Live
                                icon: mdi:soccer
                              card:
                                type: custom:decluttering-card
                                template: game_stats
                                variables:
                                  - sport: LIGA
                                  - status: IN
                            - attributes:
                                label: Post-Match
                                icon: mdi:blood-bag
                              card:
                                type: custom:decluttering-card
                                template: game_stats
                                variables:
                                  - sport: LIGA
                                  - status: POST
                    - attributes:
                        label: Bundesliga
                        icon: mdi:soccer
                      card:
                        type: custom:mod-card
                        card_mod:
                          style:
                            tabbed-card $: |
                              mwc-tab {
                                background: var(--ha-card-background, var(--card-background-color, white) );
                                border-color: black;
                                border-width: 2.5px;
                                border-top-left-radius: 20px;
                                border-top-right-radius: 20px;
                                border-style: solid;
                                overflow: hidden;
                                width: 16%;
                              }
                              mwc-tab[active] {
                                background: #d20515 !important;
                              }
                        card:
                          type: custom:tabbed-card
                          styles:
                            '--mdc-theme-primary': white
                            '--mdc-tab-text-label-color-default': silver
                            '--mdc-typography-button-font-size': 12px
                          tabs:
                            - attributes:
                                label: Table
                                icon: mdi:ballot
                              card:
                                type: custom:decluttering-card
                                template: bundesliga_settings
                                variables:
                                  - title: League
                                  - entity: sensor.german_bundesliga
                                  - attribute: entries
                                  - sort: >-
                                      x.stats.find(y=>y.shortDisplayName ==
                                      'PTS').value          
                            - attributes:
                                label: Pre-Match
                                icon: mdi:soccer-field
                              card:
                                type: custom:decluttering-card
                                template: game_stats
                                variables:
                                  - sport: BUND
                                  - status: PRE
                            - attributes:
                                label: Live
                                icon: mdi:soccer
                              card:
                                type: custom:decluttering-card
                                template: game_stats
                                variables:
                                  - sport: BUND
                                  - status: IN
                            - attributes:
                                label: Post-Match
                                icon: mdi:blood-bag
                              card:
                                type: custom:decluttering-card
                                template: game_stats
                                variables:
                                  - sport: BUND
                                  - status: POST
                    - attributes:
                        label: Ligue 1
                        icon: mdi:soccer
                      card:
                        type: custom:mod-card
                        card_mod:
                          style:
                            tabbed-card $: |
                              mwc-tab {
                                background: var(--ha-card-background, var(--card-background-color, white) );
                                border-color: black;
                                border-width: 2.5px;
                                border-top-left-radius: 20px;
                                border-top-right-radius: 20px;
                                border-style: solid;
                                overflow: hidden;
                                width: 16%;
                              }
                              mwc-tab[active] {
                                background: #091C3E !important;
                              }
                        card:
                          type: custom:tabbed-card
                          styles:
                            '--mdc-theme-primary': white
                            '--mdc-tab-text-label-color-default': silver
                            '--mdc-typography-button-font-size': 12px
                          tabs:
                            - attributes:
                                label: Table
                                icon: mdi:ballot
                              card:
                                type: custom:decluttering-card
                                template: ligue1_settings
                                variables:
                                  - title: League
                                  - entity: sensor.french_ligue_1
                                  - attribute: entries
                                  - sort: >-
                                      x.stats.find(y=>y.shortDisplayName ==
                                      'PTS').value
                            - attributes:
                                label: Pre-Match
                                icon: mdi:soccer-field
                              card:
                                type: custom:decluttering-card
                                template: game_stats
                                variables:
                                  - sport: LIG1
                                  - status: PRE
                            - attributes:
                                label: Live
                                icon: mdi:soccer
                              card:
                                type: custom:decluttering-card
                                template: game_stats
                                variables:
                                  - sport: LIG1
                                  - status: IN
                            - attributes:
                                label: Post-Match
                                icon: mdi:blood-bag
                              card:
                                type: custom:decluttering-card
                                template: game_stats
                                variables:
                                  - sport: LIG1
                                  - status: POST
                    - attributes:
                        label: Champions League
                        icon: mdi:soccer
                      card:
                        type: custom:mod-card
                        card_mod:
                          style:
                            tabbed-card $: |
                              mwc-tab {
                                background: var(--ha-card-background, var(--card-background-color, white) );
                                border-color: black;
                                border-width: 2.5px;
                                border-top-left-radius: 20px;
                                border-top-right-radius: 20px;
                                border-style: solid;
                                overflow: hidden;
                                width: 16%;
                              }
                              mwc-tab[active] {
                                background: #14223E !important;
                              }
                        card:
                          type: custom:tabbed-card
                          styles:
                            '--mdc-theme-primary': white
                            '--mdc-tab-text-label-color-default': silver
                            '--mdc-typography-button-font-size': 12px
                          tabs:
                            - attributes:
                                label: Table
                                icon: mdi:ballot
                              card:
                                type: custom:stack-in-card
                                mode: vertical
                                cards:
                                  - type: custom:decluttering-card
                                    template: uefa_settings
                                    variables:
                                      - title: League
                                      - entity: sensor.uefa_champions_league
                                      - attribute: entries
                                      - sort: >-
                                          x.stats.find(y=>y.shortDisplayName ==
                                          'Points').value
                            - attributes:
                                label: Pre-Match
                                icon: mdi:soccer-field
                              card:
                                type: custom:decluttering-card
                                template: game_stats
                                variables:
                                  - sport: CL
                                  - status: PRE
                            - attributes:
                                label: Live
                                icon: mdi:soccer
                              card:
                                type: custom:decluttering-card
                                template: game_stats
                                variables:
                                  - sport: CL
                                  - status: IN
                            - attributes:
                                label: Post-Match
                                icon: mdi:blood-bag
                              card:
                                type: custom:decluttering-card
                                template: game_stats
                                variables:
                                  - sport: CL
                                  - status: POST

TeamTracker. I’m sharing all but EFL Championship and League One. I have them, but they do not seem to generate well using this method. You’d be better off manually creating the teams you wish to follow using the HA Integration.

##
##  English Premier League
##
- platform: teamtracker
  league_id: EPL
  team_id: BOU
  name: AFC Bournemouth
  league_path: eng.1
- platform: teamtracker
  league_id: EPL
  team_id: IPS
  name: Ipswich Town
  league_path: eng.1
- platform: teamtracker
  league_id: EPL
  team_id: LEI
  name: Leicester City
  league_path: eng.1
- platform: teamtracker
  league_id: EPL
  team_id: LIV
  name: Liverpool
  league_path: eng.1
- platform: teamtracker
  league_id: EPL
  team_id: MNC
  name: Manchester City
  league_path: eng.1
- platform: teamtracker
  league_id: EPL
  team_id: MAN
  name: Manchester United
  league_path: eng.1
- platform: teamtracker
  league_id: EPL
  team_id: NEW
  name: Newcastle United
  league_path: eng.1
- platform: teamtracker
  league_id: EPL
  team_id: NFO
  name: Nottingham Forest
  league_path: eng.1
- platform: teamtracker
  league_id: EPL
  team_id: SOU
  name: Southampton
  league_path: eng.1
- platform: teamtracker
  league_id: EPL
  team_id: TOT
  name: Tottenham Hotspur
  league_path: eng.1
- platform: teamtracker
  league_id: EPL
  team_id: WHU
  name: West Ham United
  league_path: eng.1
- platform: teamtracker
  league_id: EPL
  team_id: ARS
  name: Arsenal
  league_path: eng.1
- platform: teamtracker
  league_id: EPL
  team_id: WOL
  name: Wolverhampton Wanderers
  league_path: eng.1
- platform: teamtracker
  league_id: EPL
  team_id: AVL
  name: Aston Villa
  league_path: eng.1
- platform: teamtracker
  league_id: EPL
  team_id: BRE
  name: Brentford
  league_path: eng.1
- platform: teamtracker
  league_id: EPL
  team_id: BHA
  name: Brighton & Hove Albion
  league_path: eng.1
- platform: teamtracker
  league_id: EPL
  team_id: CHE
  name: Chelsea
  league_path: eng.1
- platform: teamtracker
  league_id: EPL
  team_id: CRY
  name: Crystal Palace
  league_path: eng.1
- platform: teamtracker
  league_id: EPL
  team_id: EVE
  name: Everton
  league_path: eng.1
- platform: teamtracker
  league_id: EPL
  team_id: FUL
  name: Fulham
  league_path: eng.1
##
##  Italian Serie A Table
##
- platform: teamtracker
  league_id: SERA
  team_id: MIL
  name: AC Milan
  league_path: ita.1
- platform: teamtracker
  league_id: SERA
  team_id: VER
  name: Hellas Verona
  league_path: ita.1
- platform: teamtracker
  league_id: SERA
  team_id: INT
  name: Internazionale
  league_path: ita.1
- platform: teamtracker
  league_id: SERA
  team_id: JUV
  name: Juventus
  league_path: ita.1
- platform: teamtracker
  league_id: SERA
  team_id: LAZ
  name: Lazio
  league_path: ita.1
- platform: teamtracker
  league_id: SERA
  team_id: LEC
  name: Lecce
  league_path: ita.1
- platform: teamtracker
  league_id: SERA
  team_id: MON
  name: Monza
  league_path: ita.1
- platform: teamtracker
  league_id: SERA
  team_id: NAP
  name: Napoli
  league_path: ita.1
- platform: teamtracker
  league_id: SERA
  team_id: PAR
  name: Parma
  league_path: ita.1
- platform: teamtracker
  league_id: SERA
  team_id: TOR
  name: Torino
  league_path: ita.1
- platform: teamtracker
  league_id: SERA
  team_id: UDI
  name: Udinese
  league_path: ita.1
- platform: teamtracker
  league_id: SERA
  team_id: ROMA
  name: AS Roma
  league_path: ita.1
- platform: teamtracker
  league_id: SERA
  team_id: VEN
  name: Venezia
  league_path: ita.1
- platform: teamtracker
  league_id: SERA
  team_id: ATA
  name: Atalanta
  league_path: ita.1
- platform: teamtracker
  league_id: SERA
  team_id: BOL
  name: Bologna
  league_path: ita.1
- platform: teamtracker
  league_id: SERA
  team_id: CAG
  name: Cagliari
  league_path: ita.1
- platform: teamtracker
  league_id: SERA
  team_id: COMO
  name: Como
  league_path: ita.1
- platform: teamtracker
  league_id: SERA
  team_id: EMP
  name: Empoli
  league_path: ita.1
- platform: teamtracker
  league_id: SERA
  team_id: FIO
  name: Fiorentina
  league_path: ita.1
- platform: teamtracker
  league_id: SERA
  team_id: GEN
  name: Genoa
  league_path: ita.1
##
##  Spanish LALIGA Table
##
- platform: teamtracker
  league_id: LIGA
  team_id: ALA
  name: Alavés
  league_path: esp.1
- platform: teamtracker
  league_id: LIGA
  team_id: LEG
  name: Leganés
  league_path: esp.1
- platform: teamtracker
  league_id: LIGA
  team_id: MLL
  name: Mallorca
  league_path: esp.1
- platform: teamtracker
  league_id: LIGA
  team_id: OSA
  name: Osasuna
  league_path: esp.1
- platform: teamtracker
  league_id: LIGA
  team_id: RAY
  name: Rayo Vallecano
  league_path: esp.1
- platform: teamtracker
  league_id: LIGA
  team_id: BET
  name: Real Betis
  league_path: esp.1
- platform: teamtracker
  league_id: LIGA
  team_id: RMA
  name: Real Madrid
  league_path: esp.1
- platform: teamtracker
  league_id: LIGA
  team_id: RSO
  name: Real Sociedad
  league_path: esp.1
- platform: teamtracker
  league_id: LIGA
  team_id: VLL
  name: Real Valladolid
  league_path: esp.1
- platform: teamtracker
  league_id: LIGA
  team_id: SEV
  name: Sevilla
  league_path: esp.1
- platform: teamtracker
  league_id: LIGA
  team_id: VAL
  name: Valencia
  league_path: esp.1
- platform: teamtracker
  league_id: LIGA
  team_id: ATH
  name: Athletic Club
  league_path: esp.1
- platform: teamtracker
  league_id: LIGA
  team_id: VIL
  name: Villarreal
  league_path: esp.1
- platform: teamtracker
  league_id: LIGA
  team_id: ATM
  name: Atlético Madrid
  league_path: esp.1
- platform: teamtracker
  league_id: LIGA
  team_id: BAR
  name: Barcelona
  league_path: esp.1
- platform: teamtracker
  league_id: LIGA
  team_id: CEL
  name: Celta Vigo
  league_path: esp.1
- platform: teamtracker
  league_id: LIGA
  team_id: ESP
  name: Espanyol
  league_path: esp.1
- platform: teamtracker
  league_id: LIGA
  team_id: GET
  name: Getafe
  league_path: esp.1
- platform: teamtracker
  league_id: LIGA
  team_id: GIR
  name: Girona
  league_path: esp.1
- platform: teamtracker
  league_id: LIGA
  team_id: LPA
  name: Las Palmas
  league_path: esp.1
##
##  German Bundesliga Table
##
- platform: teamtracker
  league_id: BUND
  team_id: HDH
  name: 1. FC Heidenheim 1846
  league_path: ger.1
- platform: teamtracker
  league_id: BUND
  team_id: M05
  name: Mainz
  league_path: ger.1
- platform: teamtracker
  league_id: BUND
  team_id: RBL
  name: RB Leipzig
  league_path: ger.1
- platform: teamtracker
  league_id: BUND
  team_id: SCF
  name: SC Freiburg
  league_path: ger.1
- platform: teamtracker
  league_id: BUND
  team_id: STP
  name: St. Pauli
  league_path: ger.1
- platform: teamtracker
  league_id: BUND
  team_id: TSG
  name: TSG Hoffenheim
  league_path: ger.1
- platform: teamtracker
  league_id: BUND
  team_id: VFB
  name: VfB Stuttgart
  league_path: ger.1
- platform: teamtracker
  league_id: BUND
  team_id: BOC
  name: VfL Bochum
  league_path: ger.1
- platform: teamtracker
  league_id: BUND
  team_id: WOB
  name: VfL Wolfsburg
  league_path: ger.1
- platform: teamtracker
  league_id: BUND
  team_id: SVW
  name: Werder Bremen
  league_path: ger.1
- platform: teamtracker
  league_id: BUND
  team_id: FCU
  name: 1. FC Union Berlin
  league_path: ger.1
- platform: teamtracker
  league_id: BUND
  team_id: B04
  name: Bayer Leverkusen
  league_path: ger.1
- platform: teamtracker
  league_id: BUND
  team_id: MUN
  name: Bayern Munich
  league_path: ger.1
- platform: teamtracker
  league_id: BUND
  team_id: DOR
  name: Borussia Dortmund
  league_path: ger.1
- platform: teamtracker
  league_id: BUND
  team_id: BMG
  name: Borussia Monchengladbach
  league_path: ger.1
- platform: teamtracker
  league_id: BUND
  team_id: SGE
  name: Eintracht Frankfurt
  league_path: ger.1
- platform: teamtracker
  league_id: BUND
  team_id: FCA
  name: FC Augsburg
  league_path: ger.1
- platform: teamtracker
  league_id: BUND
  team_id: KSV
  name: Holstein Kiel
  league_path: ger.1
##
##  French Ligue 1 Table
##
- platform: teamtracker
  league_id: LIG1
  team_id: AUX
  name: AJ Auxerre
  league_path: fra.1
- platform: teamtracker
  league_id: LIG1
  team_id: MON
  name: Montpellier
  league_path: fra.1
- platform: teamtracker
  league_id: LIG1
  team_id: NAN
  name: Nantes
  league_path: fra.1
- platform: teamtracker
  league_id: LIG1
  team_id: NICE
  name: Nice
  league_path: fra.1
- platform: teamtracker
  league_id: LIG1
  team_id: PSG
  name: Paris Saint-Germain
  league_path: fra.1
- platform: teamtracker
  league_id: LIG1
  team_id: ASSE
  name: Saint-Etienne
  league_path: fra.1
- platform: teamtracker
  league_id: LIG1
  team_id: REIM
  name: Stade de Reims
  league_path: fra.1
- platform: teamtracker
  league_id: LIG1
  team_id: REN
  name: Stade Rennais
  league_path: fra.1
- platform: teamtracker
  league_id: LIG1
  team_id: STR
  name: Strasbourg
  league_path: fra.1
- platform: teamtracker
  league_id: LIG1
  team_id: TOU
  name: Toulouse
  league_path: fra.1
- platform: teamtracker
  league_id: LIG1
  team_id: ANG
  name: Angers
  league_path: fra.1
- platform: teamtracker
  league_id: LIG1
  team_id: MON
  name: AS Monaco
  league_path: fra.1
- platform: teamtracker
  league_id: LIG1
  team_id: BRES
  name: Brest
  league_path: fra.1
- platform: teamtracker
  league_id: LIG1
  team_id: HAC
  name: Le Havre AC
  league_path: fra.1
- platform: teamtracker
  league_id: LIG1
  team_id: RCL
  name: Lens
  league_path: fra.1
- platform: teamtracker
  league_id: LIG1
  team_id: LILL
  name: Lille
  league_path: fra.1
- platform: teamtracker
  league_id: LIG1
  team_id: LYON
  name: Lyon
  league_path: fra.1
- platform: teamtracker
  league_id: LIG1
  team_id: OLM
  name: Marseille
  league_path: fra.1
##
##  UEFA Champions Table
##
- platform: teamtracker
  league_id: CL
  team_id: MIL
  name: CL-AC Milan
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: BEN
  name: CL-Benfica
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: BOL
  name: CL-Bologna
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: DOR
  name: CL-Borussia Dortmund
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: BRES
  name: CL-Brest
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: CEL
  name: CL-Celtic
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: BRU
  name: CL-Club Brugge
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: DZG
  name: CL-Dinamo Zagreb
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: FEY
  name: CL-Feyenoord Rotterdam
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: GIR
  name: CL-Girona
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: INT
  name: CL-Internazionale
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: ARS
  name: CL-Arsenal
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: JUV
  name: CL-Juventus
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: LILL
  name: CL-Lille
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: LIV
  name: CL-Liverpool
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: MNC
  name: CL-Manchester City
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: PSG
  name: CL-Paris Saint-Germain
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: PSV
  name: CL-PSV Eindhoven
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: RBL
  name: CL-RB Leipzig
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: SLZ
  name: CL-RB Salzburg
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: RMA
  name: CL-Real Madrid
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: RSB
  name: CL-Red Star Belgrade
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: MON
  name: CL-AS Monaco
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: SHK
  name: CL-Shakhtar Donetsk
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: STG
  name: CL-SK Sturm Graz
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: SLB
  name: CL-Slovan Bratislava
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: AVL
  name: CL-Aston Villa
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: ATA
  name: CL-Atalanta
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: ATM
  name: CL-Atlético Madrid
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: BAR
  name: CL-Barcelona
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: B04
  name: CL-Bayer Leverkusen
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: MUN
  name: CL-Bayern Munich
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: SPP
  name: CL-Sparta Prague
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: SCP
  name: CL-Sporting CP
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: VFB
  name: CL-VfB Stuttgart
  league_path: uefa.champions
- platform: teamtracker
  league_id: CL
  team_id: YB
  name: CL-Young Boys
  league_path: uefa.champions
##
##  

As always, nicely done @ehcah .

I am not going to post all of the code I have in this soccer sandbox but will put in pieces that I am doing now if it helps anyone. I am sandboxing the soccer leagues and want to get back to NCAAF and starting to sandbox the NCAA Basketball.

As I have stated earlier, templates errored out on a couple of the NCAA conferences because of their size. So everything I am pulling is through sensors. I still use templates but for the things that fit.

@ehcah and I are looking at performance and trying to determine if there are ways to improve - like reducing code.

One more quick comment. I do notice when I restart my HA container I will see API errors. I am guessing that ESPN is shutting down the requests I am making at the same time. These eventually get populated, but if you see them they typically populate soon.

So in soccer I noticed that you have to change where the promotion/relegation/on the bubble lines are for the leagues.

Here is an example:
Premier League looks like this:


Bundesliga looks like this:

And Bundesliga 2 looks like this:

So I adjusted my decluttering card to take variables and put the 4 colored lines where you want.

here are the variables. They correspond to a line and if you put 0 then no line for that variable

    - promotion: 0
    - in-running: 6
    - near-out: 15
    - relegation: 17

The decluttering card that does that is here:

soccer_standings:
    card:
      type: custom:flex-table-card
      title: '[[title]]'
      css:
        table+: 'padding: 0px; width: 100%; border-collapse: collapse; margin-top:12px;'
        tbody tr td:first-child: 'width: 1%;'
        tbody tr td:nth-child(2): 'width: 10%;'
        tbody tr td:nth-child(3): 'width: 3%;'
        tbody tr td:nth-child(n+4): 'width: 1%;'
        tbody tr td:nth-child(5): 'color: green;'
        tbody tr td:nth-child(6): 'color: yellow;'
        tbody tr td:nth-child(7): 'color: red;'
        tbody tr td:nth-child(10): 'background-color: green; color: white;'
        tbody tr:nth-child([[relegation]]): 'border-bottom: 2px solid crimson!important;'
        tbody tr:nth-child([[near-out]]): 'border-bottom: 2px solid yellow!important;'
        tbody tr:nth-child([[in-running]]): 'border-bottom: 2px solid dodgerblue!important;'
        tbody tr:nth-child([[promotion]]): 'border-bottom: 2px solid green!important;'
        tbody tr:hover: 'background-color: dimgrey!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;
             }
      sort_by:
        - entries+
      entities:
        include: '[[entity]]'
      columns:
        - name: Rank
          data: entries
          modify: >-
            if(typeof x.stats.find(y=>y.abbreviation == 'R')
            !=='undefined'){x.stats.find(y=>y.abbreviation ==
            'R').displayValue}else{'-'}                   
        - name: Team
          data: entries
          modify: |-
            if (typeof x.team.logos !== 'undefined')
              '<div><img src="' + x.team.logos[0].href + '" style="height:20px;vertical-align:middle;">&nbsp;' + x.team.displayName + '</div>'
            else
              '<div><span style="display: inline-block;width: 20px;"></span>&nbsp;' + x.team.displayName + '</div>'
        - name: Record
          data: entries
          hidden: false
          modify: >-
            if(typeof x.stats.find(y=>y.abbreviation == 'Total') !== 'undefined'
            ){x.stats.find(y=>y.abbreviation == 'Total').displayValue}else{'-'}
        - name: Wins
          data: entries
          hidden: false
          modify: >-
            if(typeof x.stats.find(y=>y.abbreviation == 'W') !== 'undefined'
            ){x.stats.find(y=>y.abbreviation == 'W').displayValue}else{'-'}
        - name: Draws
          data: entries
          modify: >-
            if(typeof x.stats.find(y=>y.abbreviation == 'D') !== 'undefined'
            ){x.stats.find(y=>y.abbreviation == 'D').displayValue}else{'-'}
        - name: Losses
          data: entries
          modify: >-
            if(typeof x.stats.find(y=>y.abbreviation == 'L') !== 'undefined'
            ){x.stats.find(y=>y.abbreviation ==
            'L').displayValue}else{'-'}        
        - name: Points
          data: entries
          modify: >-
            if(typeof x.stats.find(y=>y.abbreviation == 'P') !== 'undefined'
            ){x.stats.find(y=>y.abbreviation == 'P').displayValue}else{'-'}
          align: center

And here is an example of how you call it:

                            - attributes:
                                label: Premier League (EPL)
                                icon: mdi:account-group
                              card:
                                type: horizontal-stack
                                cards:
                                  - type: vertical-stack
                                    cards:
                                      - type: markdown
                                        content: |
                                          <h1>EPL Standings</h1>
                                      - type: custom:decluttering-card
                                        template: soccer_standings
                                        variables:
                                          - title: EPL Standings
                                          - entity: sensor.soccer_english_premier_league
                                          - attribute: entries
                                          - promotion: 0
                                          - in-running: 6
                                          - near-out: 15
                                          - relegation: 17
                                  - type: vertical-stack
                                    cards:
                                      - type: markdown
                                        content: >
                                          <h1>Pre,Live,Post EPL
                                          Games</h1>                            
                                      - type: markdown
                                        content: |
                                          <h1>EPL Games Live</h1>
                                      - type: custom:decluttering-card
                                        template: european_soccer_game_stats
                                        variables:
                                          - sport: EPL
                                          - sport_path: soccer
                                          - group: group.eng_1
                                          - team_names: sensor.soccer_team_names_premier_league
                                          - status: IN
                                      - type: markdown
                                        content: |
                                          <h1>EPL Games Coming-up</h1>
                                      - type: custom:decluttering-card
                                        template: european_soccer_game_stats
                                        variables:
                                          - sport: EPL
                                          - sport_path: soccer
                                          - group: group.eng_1
                                          - team_names: sensor.soccer_team_names_premier_league
                                          - status: PRE
                                      - type: markdown
                                        content: |
                                          <h1>EPL Games Completed</h1>
                                      - type: custom:decluttering-card
                                        template: european_soccer_game_stats
                                        variables:
                                          - sport: EPL
                                          - sport_path: soccer
                                          - group: group.eng_1
                                          - team_names: sensor.soccer_team_names_premier_league
                                          - status: POST

I know some will also ask what is group and names. I used that on the NCAAF card to limit the cards I am using. I am also trying to see if that helps performance. Targeted calls vs cycling through TeamTracker cards.

Here is a Bundesliga example I have in groups.yaml. you see eng.1 for the premier league and it also has a group.

ger_2:
  - sensor.fortuna_dusseldorf
  - sensor.karlsruher_sc
  - sensor.hamburg_sv
  - sensor.1_fc_magdeburg
  - sensor.sc_paderborn_07
  - sensor.hannover_96
  - sensor.hertha_berlin
  - sensor.sv_07_elversberg
  - sensor.1_fc_nurnberg
  - sensor.fc_cologne
  - sensor.kaiserslautern
  - sensor.spvgg_greuther_furth
  - sensor.sv_darmstadt_98
  - sensor.schalke_04
  - sensor.ssv_ulm_1846
  - sensor.tsv_eintracht_braunschweig
  - sensor.preussen_munster
  - sensor.ssv_jahn_regensburg

and here is the template I use to put all of the names that are in the league in a sensor which I use in decluttering card.

- name: soccer_team_names_bundesliga_two
  unique_id: sensor.soccer_team_names_bundesliga_two
  state: "{{ now() }}"
  attributes: 
    team_names: >
      {% set cteams = namespace(cteam=[]) %}
      {% for team in state_attr('sensor.soccer_bundesliga_two', 'entries') %}
        {% set cteams.cteam = cteams.cteam + [team['team']['abbreviation']] %}
      {% endfor %}
      {{ cteams.cteam | join(', ') }}

Hope this helps

1 Like

As for performance (and size) you could learn JQ, it is included in every distribution. I use it for several sensors, switching to a command_line and using curl and piping the result through JQ to strain/reorganize the data to what I want. For these sensors, one could really reduce the amount of (unneeded) data.

This is an example for my Vizio TVs which creates a sensor with the name, logo of all apps. The JQ part cleans a lot of data out.

##
## Vizio Apps
##
- sensor:
      scan_interval: 36000
      unique_id: sensor.vizio_apps
      name: Vizio Apps
      command: "curl -s 'http://scfs.vizio.com/appservice/vizio_apps_prod.json' | jq '{\"apps\": [ .[] | {id: .\"id\", name: .\"name\", icon: .\"mobileAppInfo\".\"app_icon_image_url\", sort: .\"mobileAppInfo\".\"featured_sort\" } ]}' "
      value_template: "OK"
      json_attributes:
          - apps

Thanks @kbrown01 you made me at least google JQ. I have been using python code but maybe that is something I should take a look at.

I guess that’s what I am trying to figure out - what is the better approach and will I ever want to access that “extra data”. My hand was forced because of the template limit and I am ok with the performance for now, but will see.

Getting the data into a sensor through REST would seem to me to be a better/faster way than a template, but I really don’t know of a way to measure that.

Space isn’t an issue and embarrassingly I didn’t know about the attribute checkbox in the developer tools. @ehcah brought that one to my attention and changed the way I look at the sensor data through HA. I don’t wait like I used to.

As always appreciate what you brought into my HA life with sports scores/standings.

Searched the thread for a bit and couldn’t find anything about this but is it possible & how would/could you extract the standings information for a single team to display elsewhere in HA?

A picture is worth a thousand words. Which stats, which team? It would be easy to take the standings for one team

1 Like

Agree with @kbrown01 - what sport, what team, etc.

Code I have posted dives into that. Here is Big 12 as an example

First of all, thank you @kbrown.it and @bburwell for all your work on this amazing setup. What I am looking for is to be able to display just the standings info for the Dallas Stars on a separate dashboard I have that shows their schedule and some other team-related info. Just thought it would be cool to be able to show the games played, wins, losses, points, etc.

I’m haven’t set up anything for hockey but you could do something similar to what I have shown for grabbing the Big 12 individual teams by going out to the ESPN API schedule for each team.

You will have to set up the rest sensor and probably customize a decluttering card but here is the api for the Dallas Stars Schedule

https://site.api.espn.com/apis/site/v2/sports/hockey/nhl/teams/dal/schedule?seasontype=2&type=0&level=3
1 Like

I guess a better question might have been: is it possible to use/call the attributes/children that are part of the sensor.nhl_standings entity? For instance, just to “extract” that one team’s information (games played, wins, losses, ot losses, standings, etc) so that I could use them elsewhere in HA?

For example, I can easily use the team_record attribute from sensor.seattle_kraken but I don’t know enough about HA to be able to use an attribute’s child.

Sure just grab the state_attr - Assuming you are using what @kbrown01 created try this to get the Dallas Stars data. You could also create a template as well.

{{ state_attr('sensor.nhl_standings','children')[1]['children'][0]['standings']['entries'][1] }}

Just in case you want to know how to get deeper into those here are 2 examples:

{{ state_attr('sensor.nhl_standings','children')[1]['children'][0]['standings']['entries'][1]['team'].displayName }}
{{ state_attr('sensor.nhl_standings', 'children')[1]['children'][0]['standings']['entries'][1]['stats'] | selectattr('shortDisplayName', 'equalto', 'GB') | map(attribute='value') | first }}

The challenge is if you want more data and it is not within that API. For example standings doesn’t have scores, etc.

In this picture you can see I called 2 different API’s Standings and Dallas Stars schedule just to see how it played with my ncaa_team_schedules_2 decluttering card I posted in October. Works with no changes so ESPN is maintaining the format across sports it looks like - at least with these 2