Sports Standings and Scores

I have updates the GITHUB template.yaml and the dashboard.yaml with the NHL Wildcard display. It has groups for the top three, the two wildcard teams, the “in the hunt” teams and the eliminated teams. Of course, if you want to eliminate the “golfers” you can, just edit the dashboard.yaml to not have that table.

Now that we are through hockey, I am looking to users for suggestions. Here are some I have in mind.

  1. Reorganize all the YAML into a set of folders – this makes it easier to include the sensors if we separate them into their own. Then you would just use a merge directory style include.

  2. I started to look at a way to use something that would allow include/exclude tabs … like I only want NHL and NBA … but not sure tabbed cards then is the way to go, maybe swipe of something or multiple dashboards. But I was envisioning a screen with associated input_boolean toggles that turns on/off tabs. But that is my preference because I want all NHL, MLB, NFL and NBA at least. Thinking of step (1) above … there is no reason to have all the sensors and such for all teams if you don’t care about NBA.

  3. If we do some configuartion screen, we would naturally add many other features – like picking the sortby fields or changing colors.

  4. Adding the key that y’all have put together.. Implemented for NHL, will expand to other sports or others can. To be nice data citizens, we should add attribution to that key stating the data is from ESPN (or wherever it comes from like potentially Yahoo)

  5. Fantasy! – I would love to do a team<-> team matchup for my opposing team in Fantasy but that is a whole different animal.

  6. Click through to ESPN team for teams … this one is easy and I could do right away. Just would add the team logo/name wrapped in a link that is already in the data.Done for NHL

I like the idea of a configuration screen to select tabs, sort orders, colors, etc. in points 2 and 3.

I also support point 4 of adding a key. There would need to be one for each sport. Most of the stats are the same, but for example Baseball and Basketball have a “GB” or Games Back stat, while Hockey and Football do not. Is it possible in lovelace or a frontend mod to do tooltip text if you hover over a column header? Similar to how ESPN does it.

For many things we are subservient to what the GUI widget allows … take flex-table for example. I see no where tooltip is allowed. I just finished reading enhancement requests on tabbed-card and there are many that would like conditionality on tabs (display based on some condition) but while request by many, it is not yet implemented.

For some of these things it is possible to do in card-mod, I will start to play with them.

I did add #6 (not uploaded yet but if someone wants it I can). I made all (NHL for now) team’s logos clickable to open a new browser window with the team’s clubhouse. Here I clicked the Maple Leafs logo and it opens the ESPN Maple Leaf’s Clubhouse.

OK, I have a better solution instead of a “key”.

See Flex-table-card - #84 by kbrown01

This simple change will allow mouseover display of the “key” when you mouseover the header.

image

I will implement with NHL “key” names soon.

1 Like

hooray tooltip text!

1 Like

Yes! Even multilines now: LIke:

image

OK, uploaded new dashboard.yaml to GITHUB. This includes linking the team logo to open a new browser window in desktop mode to their Clubhouse on ESPN. It also includes tooltip mouseover for all column headings for the tables.

1 Like

I think it’s great with the tooltips and the links in the logos.

Unfortunately, the tooltip does not work on mobile devices.

Do you have anything else in mind towards the playoff tree?

Something like that:

1 Like

Yes, you would need to implement custom Javascript since a mobile device is touch or possibly it could be done in CSS pure by using :hover and :active.

I do not think I can do it this year. I will be out of country for next few weeks.
I did a brief check and it looks like the data would be available here:

https://site.web.api.espn.com/apis/v2/sports/hockey/nhl/standings?seasontype=3&type=0&level=1

seasontype = 3 is playoffs
level = 1 is overall standings

However, there is no data right now because it has not started so it’s hard to know what will be in there.
Or possibly it could just be extracted from teamtracker although it may not have what I would think we would want … like the current head-to-head standings (Tampa leads Toronto 2 - 1).

Once things get started I can take a look and possibly have something before the end.

Another option may be using scrape and getting this data. I like this presentation and we could make it much prettier with logos and such.

I’m not sure what you mean exactly. What should I do exactly?

Ok I understand. Then we’ll have to wait and see.

@kbrown01 it looks like ESPN changed their data a little bit. both NFL and MLB the standings don’t match the headings. I’m seeing the win percentage in the wins column, streak in the ties column, and a few other oddities with the data being displayed.

I will have to look at it when I get back from Europe.

At the Moment I get this Warnings in the logs:

State attributes for sensor.nhl_west_central exceed maximum size of 16384 bytes. This can cause database performance issues; Attributes will not be stored
State attributes for sensor.nhl_wildcard_standings exceed maximum size of 16384 bytes. This can cause database performance issues; Attributes will not be stored
State attributes for sensor.nhl_east_metropolitan exceed maximum size of 16384 bytes. This can cause database performance issues; Attributes will not be stored
State attributes for sensor.nhl_west_pacific exceed maximum size of 16384 bytes. This can cause database performance issues; Attributes will not be stored
State attributes for sensor.nhl_east_atlantic exceed maximum size of 16384 bytes. This can cause database performance issues; Attributes will not be stored

I have big problems at the moment with my homeassistant. Maybe it has to do with the warnings

Those warnings are HA saying the data in the entity and attributes is much bigger than expected and not all of it will be saved to the database, only a portion. It also tells you that trying to save and recall that much data from the database can cause performance issues.

Honestly, there’s no reason to keep the historical data of these sensors so exclude them from your recorder and restart HA.

How can I exclude the historical data from record?

But my database is external on a server, so must I exclude it? So is there an performance issue?