So figure I would toss this out here and maybe it helps someone. It is by nowhere complete or at a finished state. It is sloppy and needs to be tightened up but figured it might help someone who was thinking along the similar line.
I have been focused on NCAAF and trying to get a layout I like. I wanted to be able to go into a conference and get the data on a single pane for that conference. Same thought around what I posted yesterday on a single place to show the top 25 team games for the upcoming weekend.
Anyway I started seeing my sandbox was getting cluttered. So I looked into collapsible cards. Nothing officially supported but it looks like Alia5 started creating a card a couple years ago. I can’t tell if he is still working on it which was a concern. (here is a link to that card - https://github.com/Alia5/lovelace-expander-card/tree/master.
I saw another card which I believe is a fork for it and can be found here: https://github.com/spencermamer/lovelace-expander-card
What this has allowed me to create is this:
Along the right you can see that I have:
- Conference Standings as a collapsible card
- All teams in this conference are collapsible
- Pulling from the teams schedules I show the final scores of the previous games and the upcoming games. Now I duplicate that with another schedule of games but again I will clean those up.
- You have already seen this, but the cards in the lower left show upcoming matchups with the Teamtracker card. I used something similar as the red zone and outlined in blue if it was a Conference game.
Here is the code that is used in this NCAAF sandbox:
I have only completed the Big 12 at this time here is that code that I have in my ncaaf_sensors.yaml file
##
## NCAA Teams
## Big 12 Conference
- platform: teamtracker
league_id: "NCAAF"
team_id: "ARIZ"
sport_path: football
league_path: "college-football"
conference_id: 4
name: "University of Arizona"
- platform: rest
scan_interval: 36000
name: ncaaf_schedule_big_12_university_of_arizona
unique_id: sensor.ncaaf_schedule_big_12_university_of_arizona
resource: http://site.api.espn.com/apis/site/v2/sports/football/college-football/teams/ARIZ/schedule
value_template: "{{ now() }}"
json_attributes:
- team
- events
- platform: teamtracker
league_id: "NCAAF"
team_id: "ASU"
sport_path: football
league_path: "college-football"
conference_id: 4
name: "Arizona State University"
- platform: rest
scan_interval: 36000
name: ncaaf_schedule_big_12_arizona_state_university
unique_id: sensor.ncaaf_schedule_big_12_arizona_state_university
resource: http://site.api.espn.com/apis/site/v2/sports/football/college-football/teams/ASU/schedule?seasontype=2&type=0&level=3
value_template: "{{ now() }}"
json_attributes:
- team
- events
- platform: teamtracker
league_id: "NCAAF"
team_id: "BAY"
sport_path: football
league_path: "college-football"
conference_id: 4
name: "Baylor University"
- platform: rest
scan_interval: 36000
name: ncaaf_schedule_big_12_baylor_university
unique_id: sensor.ncaaf_schedule_big_12_baylor_university
resource: http://site.api.espn.com/apis/site/v2/sports/football/college-football/teams/BAY/schedule?seasontype=2&type=0&level=3
value_template: "{{ now() }}"
json_attributes:
- team
- events
- platform: teamtracker
league_id: "NCAAF"
team_id: "BYU"
sport_path: football
league_path: "college-football"
conference_id: 4
name: "Brigham Young University"
- platform: rest
scan_interval: 36000
name: ncaaf_schedule_big_12_brigham_young_university
unique_id: sensor.ncaaf_schedule_big_12_brigham_young_university
resource: http://site.api.espn.com/apis/site/v2/sports/football/college-football/teams/BYU/schedule?seasontype=2&type=0&level=3
value_template: "{{ now() }}"
json_attributes:
- team
- events
- platform: teamtracker
league_id: "NCAAF"
team_id: "UCF"
sport_path: football
league_path: "college-football"
conference_id: 4
name: "University of Central Florida"
- platform: rest
scan_interval: 36000
name: ncaaf_schedule_big_12_university_of_central_florida
unique_id: sensor.ncaaf_schedule_big_12_university_of_central_florida
resource: http://site.api.espn.com/apis/site/v2/sports/football/college-football/teams/UCF/schedule?seasontype=2&type=0&level=3
value_template: "{{ now() }}"
json_attributes:
- team
- events
- platform: teamtracker
league_id: "NCAAF"
team_id: "CIN"
sport_path: football
league_path: "college-football"
conference_id: 4
name: "University of Cincinnati"
- platform: rest
scan_interval: 36000
name: ncaaf_schedule_big_12_university_of_cincinnati
unique_id: sensor.ncaaf_schedule_big_12_university_of_cincinnati
resource: http://site.api.espn.com/apis/site/v2/sports/football/college-football/teams/CIN/schedule?seasontype=2&type=0&level=3
value_template: "{{ now() }}"
json_attributes:
- team
- events
- platform: teamtracker
league_id: "NCAAF"
team_id: "COLO"
sport_path: football
league_path: "college-football"
conference_id: 4
name: "University of Colorado Boulder"
- platform: rest
scan_interval: 36000
name: ncaaf_schedule_big_12_university_colorado
unique_id: sensor.ncaaf_schedule_big_12_university_colorado
resource: http://site.api.espn.com/apis/site/v2/sports/football/college-football/teams/COLO/schedule?seasontype=2&type=0&level=3
value_template: "{{ now() }}"
json_attributes:
- team
- events
- platform: teamtracker
league_id: "NCAAF"
team_id: "HOU"
sport_path: football
league_path: "college-football"
conference_id: 4
name: "University of Houston"
- platform: rest
scan_interval: 36000
name: ncaaf_schedule_big_12_university_of_houston
unique_id: sensor.ncaaf_schedule_big_12_university_of_houston
resource: http://site.api.espn.com/apis/site/v2/sports/football/college-football/teams/HOU/schedule?seasontype=2&type=0&level=3
value_template: "{{ now() }}"
json_attributes:
- team
- events
- platform: teamtracker
league_id: "NCAAF"
team_id: "ISU"
sport_path: football
league_path: "college-football"
conference_id: 4
name: "Iowa State University"
- platform: rest
scan_interval: 36000
name: ncaaf_schedule_big_12_iowa_state_university
unique_id: sensor.ncaaf_schedule_big_12_iowa_state_university
resource: http://site.api.espn.com/apis/site/v2/sports/football/college-football/teams/ISU/schedule?seasontype=2&type=0&level=3
value_template: "{{ now() }}"
json_attributes:
- team
- events
- platform: teamtracker
league_id: "NCAAF"
team_id: "KU"
sport_path: football
league_path: "college-football"
conference_id: 4
name: "University of Kansas"
- platform: rest
scan_interval: 36000
name: ncaaf_schedule_big_12_univeristy_of_kansas
unique_id: sensor.ncaaf_schedule_big_12_univeristy_of_kansas
resource: http://site.api.espn.com/apis/site/v2/sports/football/college-football/teams/KU/schedule?seasontype=2&type=0&level=3
value_template: "{{ now() }}"
json_attributes:
- team
- events
- platform: teamtracker
league_id: "NCAAF"
team_id: "KSU"
sport_path: football
league_path: "college-football"
conference_id: 4
name: "Kansas State University"
- platform: rest
scan_interval: 36000
name: ncaaf_schedule_big_12_kansas_state_university
unique_id: sensor.ncaaf_schedule_big_12_kansas_state_university
resource: http://site.api.espn.com/apis/site/v2/sports/football/college-football/teams/KSU/schedule?seasontype=2&type=0&level=3
value_template: "{{ now() }}"
json_attributes:
- team
- events
- platform: teamtracker
league_id: "NCAAF"
team_id: "OKST"
sport_path: football
league_path: "college-football"
conference_id: 4
name: "Oklahoma State University"
- platform: rest
scan_interval: 36000
name: ncaaf_schedule_big_12_oklahoma_state_university
unique_id: sensor.ncaaf_schedule_big_12_oklahoma_state_university
resource: http://site.api.espn.com/apis/site/v2/sports/football/college-football/teams/OKST/schedule?seasontype=2&type=0&level=3
value_template: "{{ now() }}"
json_attributes:
- team
- events
- platform: teamtracker
league_id: "NCAAF"
team_id: "TCU"
sport_path: football
league_path: "college-football"
conference_id: 4
name: "Texas Christian University"
- platform: rest
scan_interval: 36000
name: ncaaf_schedule_big_12_texas_christian_university
unique_id: sensor.ncaaf_schedule_big_12_texas_christian_university
resource: http://site.api.espn.com/apis/site/v2/sports/football/college-football/teams/TCU/schedule?seasontype=2&type=0&level=3
value_template: "{{ now() }}"
json_attributes:
- team
- events
- platform: teamtracker
league_id: "NCAAF"
team_id: "TTU"
sport_path: football
league_path: "college-football"
conference_id: 4
name: "Texas Tech University"
- platform: rest
scan_interval: 36000
name: ncaaf_schedule_big_12_texas_tech_university
unique_id: sensor.ncaaf_schedule_big_12_texas_tech_university
resource: http://site.api.espn.com/apis/site/v2/sports/football/college-football/teams/TTU/schedule?seasontype=2&type=0&level=3
value_template: "{{ now() }}"
json_attributes:
- team
- events
- platform: teamtracker
league_id: "NCAAF"
team_id: "UTAH"
sport_path: football
league_path: "college-football"
conference_id: 4
name: "University of Utah"
- platform: rest
scan_interval: 36000
name: ncaaf_schedule_big_12_university_of_utah
unique_id: sensor.ncaaf_schedule_big_12_university_of_utah
resource: http://site.api.espn.com/apis/site/v2/sports/football/college-football/teams/UTAH/schedule?seasontype=2&type=0&level=3
value_template: "{{ now() }}"
json_attributes:
- team
- events
- platform: teamtracker
league_id: "NCAAF"
team_id: "WVU"
sport_path: football
league_path: "college-football"
conference_id: 4
name: "West Virginia University"
- platform: rest
scan_interval: 36000
name: ncaaf_schedule_big_12_west_virginia_university
unique_id: sensor.ncaaf_schedule_big_12_west_virginia_university
resource: http://site.api.espn.com/apis/site/v2/sports/football/college-football/teams/WVU/schedule?seasontype=2&type=0&level=3
value_template: "{{ now() }}"
json_attributes:
- team
- events
In my groups.yaml file is this code:
Big_12_Conference_teams_group:
name: "Big 12 Conference Teams"
entities:
- sensor.arizona_state_university
- sensor.university_of_arizona
- sensor.brigham_young_university
- sensor.kansas_state_university
- sensor.oklahoma_state_university
- sensor.university_of_utah
- sensor.baylor_university
- sensor.iowa_state_university
- sensor.university_of_cincinnati
- sensor.university_of_colorado_boulder
- sensor.texas_tech_university
- sensor.university_of_houston
- sensor.university_of_kansas
- sensor.texas_christian_university
- sensor.university_of_central_florida
- sensor.west_virginia_university
sec_conference_teams_group:
name: "SEC Conference Teams"
entities:
- sensor.university_of_alabama
- sensor.university_of_arkansas
- sensor.auburn_university
- sensor.university_of_florida
- sensor.university_of_georgia
- sensor.university_of_kentucky
- sensor.louisiana_state_university
- sensor.mississippi_state_university
- sensor.university_of_oklahoma
- sensor.university_of_mississippi
- sensor.university_of_tennessee
- sensor.texas_am_university
- sensor.univerisity_of_texas_at_austin
- sensor.vanderbilt_university
acc_conference_teams_group:
name: "ACC Conference Teams"
entities:
- sensor.boston_college
- sensor.university_of_california_berkeley
- sensor.clemson_university
- sensor.duke_university
- sensor.florida_state_university
- sensor.georgia_institute_of_technology
- sensor.university_of_louisville
- sensor.university_of_miami
- sensor.university_of_north_carolina
- sensor.notre_dame_fighting_irish
- sensor.university_of_pittsburgh
- sensor.southern_methodist_university
- sensor.stanford_university
- sensor.syracuse
- sensor.university_of_virginia
- sensor.virginia_polytechnic
- sensor.wake_forest_university
To get the expander card go to the link above (I am using the spence one). Download the file, I created a directory in the /config/www/community directory called lovelace-expander-card and put the .js file there.
Then I went into dashboards resources (upper right - resources) , in resources page add resource, and pointed it here:
Hope this helps and feel free to comment.