Let me know if I should be pinging @Ildar_Gabdullin in the flex-table but since this kind of crosses figured I would post here first.
I’m still on my quest to build out individual Conference cards as I posted above. The item I am adding now are the team schedules for the rest of the season.
I’m doing this by creating a sensor for each team - which is kind of what the api requires. Here is an example:
- 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 Arizona State University Schedule
unique_id: sensor.ncaaf_arizona_state_university_schedule
resource: http://site.api.espn.com/apis/site/v2/sports/football/college-football/teams/ASU/schedule
value_template: "{{ now() }}"
json_attributes:
- team
- events
The Api includes some of the data in the team section and some in the events section so I pulled both. (Maybe I should just dump the api into a sensor?) Which gets me to my first idea:
I would like to loop through the sensors that make up the conference. Starting with Big 12. Is that possible?
Each card that is created means I need to pull some data from events and some from team - can we passs multiple sensosrs to the Flex-table Card? Specifically I want the Title to be dynamic (which definitely is a Flex-Table question)
For what ever reason I cannot drill down to
- name: Record
data: '[[events]]'
x.competitions[0].competitors[0].record[0].displayValue
It won’t return the card.
It looks correct though:
I was hoping to pass a group to the FT. replacing sensor.ncaaf_arizona_state_university_schedule with this (eventually flushed out with all teams in the conference)
If I understand correctly, you would like to add a new column with an up and down graphic illustrating rank change? If this is correct, you can modify ’ x. ’ to meet your needs. You can also change the minus, arrow-down or arrow-up to other mdi icons if you wish. I removed the NR (not ranked) response as I don’t beleive you’ll want it.
The challenge I see with your API is that it doesn’t have a previous rank value like we are using in the Top 25 Polls. Now it does have something called rankChange but it looks like every team is 0. Maybe nothing has happened over the past week. Maybe watch that one. I just can’t tell what rankchange does though.
If it doesn’t do anything to get what you want you would have to store the rank each week (like pushing the teams data into a db)
You can see that we are putting the previous rank in a column and then calculating on the current position to see if they are up/down. @ehcah and I use different methods but we are doing the same thing you can see here:
There is a rank section which you would sort on and then if rankChange shows the move up or down use that for arrows. There is updated code above that adds UP/DN, dropout-bomb and handclap for that column (snippet shown above, full code up in the thread)
I would recommend grabbing the rank and rankChange as columns and watch rankChange.
@bburwell The API response is different when chosing a score value from schedule or scoreboard. What I can’t explain is why x.x.x.score offers a response when x.x.x.score.displayValue requires further definitiion as per below?
Hi there, I have not so much experince with HA but step by step I get this to work but there is one thing that i can’t figure out at the moment and I hope somebody can me explain hoe to solve this.
I get this Error in the Dashboard and I think there something missig but I have no idea.
After a lot of try and error and many readings I have it running with the modifications to my needs. I’ve integrated the German ‘1.Bundesliga’ and ‘2.Bundesliga’.
Now my Question is : Is it possible to colorize the fields that i marked in the above picture?
The first 4 cells are qualified for CL the next 2 cells are for EL and the last cells are going down to second league.
Guessing you could just do an if else else on that ‘#’ column - similar to the rankings up and down code. If ‘#’<=4 do this, if 5-6 do this and if =>16 do this. And the do this is something @kbrown01 worked on last year on the flex-table card here:https://community.home-assistant.io/t/flex-table-card/461173/53
Not sure if you were able to add lines to your template per @bburwell 's share? This is what I do. Add more lines, change them, change the color - your choice. I only define the top 4 (nth-child 4) and bottom 2 (nth-child 16).
@ehcah nice. Do you have a github page? I was going to start building out MLS and UEFA but it looks like you already have that built. Would love to copy those files, sensors, templates, etc. and pay you with heaps of Kudos
@bburwell No github or pastebin. I’m sure I could figure something out though. Happy to share anything I have.
One challenge I’ve run into. With 570 + various sensors for sports alone, my HA server has been slowing down. As a result, I’ve start hashing out some sensors that aren’t required today. As mentioned above, I did update all my multiscrape sensors to rest or template.
I actually pulled all sensors off my server and added them onto a fresh HA install on proxmox where I keep a few machines spun up for other purposes. I thought a dedicated HA Sports Dashboard machine would be the answer. This works well for a few days and then slows. My intention is to add it back as a webpage dashboard on my server.
Yeah I have been noticing the slowdown as well. That was why I asked the question earlier about splitting up the sensors and templates. I plan on streamlining the dashboards and looking to maybe create a seasonal rotation for sports I kind of follow and then keep the main ones year around. I am also going to play around at some point with polling.
Funny thing is that I originally started looking at this because I wanted to have a scrolling marquee that I send updates to a bunch of Hub75’s. Right now I’m just sending Padres updates to a couple WS2812B’s.
Because of @kbrown01 great work this has kind of turned into something akin to eating potato chips - you think you can stop after a couple but there is always another tempting option to chose