bburwell
(Bob B)
October 17, 2024, 9:44pm
647
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;"> ' +
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 {
'';
}
bburwell
(Bob B)
October 17, 2024, 9:44pm
648
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
kbrown01
(Kbrown01)
October 17, 2024, 10:24pm
649
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
hillshome
(Hillshome)
October 19, 2024, 8:58am
650
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.
bburwell
(Bob B)
October 19, 2024, 9:00pm
651
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;"> ' + x.team.displayName + '</div>'
else
'<div><span style="display: inline-block;width: 20px;"></span> ' + 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
bburwell
(Bob B)
October 20, 2024, 4:51am
652
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
bburwell
(Bob B)
October 20, 2024, 4:53am
653
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;"> ' + x.team.displayName + '</div>'
else
'<div><span style="display: inline-block;width: 20px;"></span> ' + 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
ehcah
October 21, 2024, 12:58pm
654
@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> <a href="' + x.team.links[0].href +
'" target="_blank"><img src="' + x.team.logos[0].href +
'" style="height:20px;vertical-align:middle;"></a> ' +
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> <a href="' + x.team.links[0].href +
'" target="_blank"><img src="' + x.team.logos[0].href +
'" style="height:20px;vertical-align:middle;"></a> ' +
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> <a href="' + x.team.links[0].href +
'" target="_blank"><img src="' + x.team.logos[0].href +
'" style="height:20px;vertical-align:middle;"></a> ' +
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> <a href="' + x.team.links[0].href +
'" target="_blank"><img src="' + x.team.logos[0].href +
'" style="height:20px;vertical-align:middle;"></a> ' +
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> <a href="' + x.team.links[0].href +
'" target="_blank"><img src="' + x.team.logos[0].href +
'" style="height:20px;vertical-align:middle;"></a> ' +
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> <a href="' + x.team.links[0].href +
'" target="_blank"><img src="' + x.team.logos[0].href +
'" style="height:20px;vertical-align:middle;"></a> ' +
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> <a href="' + x.team.links[0].href +
'" target="_blank"><img src="' + x.team.logos[0].href +
'" style="height:20px;vertical-align:middle;"></a> ' +
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> <a href="' + x.team.links[0].href +
'" target="_blank"><img src="' + x.team.logos[0].href +
'" style="height:20px;vertical-align:middle;"></a> ' +
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
ehcah
October 21, 2024, 1:01pm
655
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
ehcah
October 21, 2024, 1:05pm
656
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
##
##