Sports Standings and Scores

Yes, it is merely a warning. That message would appear for any sensor who has attributes that exceed that size as it would explode the recorder database size.

1 Like

Yes I know, but my problem is, that my overall don’t show anything

For which sport? Or all of them?

I have written before I only use NHL

Did you perhaps implement the “plugin” things I posted before? See Sports Standings and Scores - #403 by kbrown01

I just had my stats all disappear for NHL because I used special “plugins” for several fields like:

      columns:
        - hidden: true
          data: '[[attribute]]'
          modify: '[[sort]]'
        - name: <div>C</div>
          data: '[[attribute]]'
          modify: plugin.clinchind(x)
        - name: Team
          data: '[[attribute]]'
          modify: >-
            '<div><a href="' + x.team.links[0].href + '" target="_blank"><img
            src="' + x.team.logos[0].href + '" style="height:
            20px;vertical-align:middle;"></a>&nbsp;' + x.team.displayName +
            '</div>'
        - name: <div>GP</div>
          data: '[[attribute]]'
          modify: plugin.sportstat(x,'GP','displayValue')
        - name: <div>W</div>
          data: '[[attribute]]'
          modify: plugin.sportstat(x,'W','displayValue')
        - name: <div>L</div>
          data: '[[attribute]]'
          modify: plugin.sportstat(x,'L','displayValue')
        - name: <div>OTL</div>
          data: '[[attribute]]'
          modify: plugin.sportstat(x,'OTL','displayValue')
        - name: <div>PTS</div>
          data: '[[attribute]]'
          modify: plugin.sportstat(x,'PTS','displayValue')
        - name: <div>RW</div>
          data: '[[attribute]]'
          modify: plugin.sportstat(x,'RW','displayValue')
        - name: <div>ROW</div>
          data: '[[attribute]]'
          modify: plugin.sportstat(x,'ROW','displayValue')
        - name: <div>SOW</div>
          data: '[[attribute]]'
          modify: plugin.sportstat(x,'SOW','displayValue')
        - name: <div>SOL</div>
          data: '[[attribute]]'
          modify: plugin.sportstat(x,'SOL','displayValue')
        - name: <div>HOME</div>
          data: '[[attribute]]'
          modify: plugin.sportstat(x,'HOME','displayValue')
        - name: <div>AWAY</div>
          data: '[[attribute]]'
          modify: plugin.sportstat(x,'AWAY','displayValue')
        - name: <div>GF</div>
          data: '[[attribute]]'
          modify: plugin.sportstat(x,'GF','displayValue')
        - name: <div>GA</div>
          data: '[[attribute]]'
          modify: plugin.sportstat(x,'GA','displayValue')
        - name: <div>DIFF</div>
          data: '[[attribute]]'
          modify: plugin.sportstat(x,'DIFF','displayValue')
        - name: <div>L10</div>
          data: '[[attribute]]'
          modify: plugin.sportstat(x,'L10','summary')
        - name: <div>STRK</div>
          data: '[[attribute]]'
          modify: plugin.sportstat(x,'STRK','displayValue')

Many of those modify fields reference plugin and therefore require the plugin solution I posted then. If you did implement it AND you updated flex-table then the customization (which has not been implemented by the owner of flex-table) is gone and would result in an error.

I found this out by updating today and then checking the stats and saw they are empty. Right clicking and inspecting the page I see errors like this:

Uncaught (in promise) ReferenceError: plugin is not defined
    at eval (eval at <anonymous> (flex-table-card.js?hacstag=156292058077:411:42), <anonymous>:1:1)
    at flex-table-card.js?hacstag=156292058077:411:42
    at Array.map (<anonymous>)
    at DataRow.render_data (flex-table-card.js?hacstag=156292058077:400:35)
    at flex-table-card.js?hacstag=156292058077:120:47
    at Array.map (<anonymous>)
    at DataTable.add (flex-table-card.js?hacstag=156292058077:120:32)
    at flex-table-card.js?hacstag=156292058077:706:26
    at Array.forEach (<anonymous>)
    at FlexTableCard._fill_card (flex-table-card.js?hacstag=156292058077:702:18)

So my plugin code was wiped out in the update (which is expected). As I only implemented it for NHL (both stats and strength of schedule) and not the other sports, this could be the reason your NHL stats are blank.

You would need to repeat the steps to re-add the plugin code OR remove any references to it and wait for the flex-table owner to implement a solution for it.

I don’t use the “plugin”.

Only the overall overview doesn’t work, division, conference and wildcards still work

So do you see any JS errors in browser when on that page? If yes, post here or examine them and it could assist you, us.

I see this error in the browser:

Uncaught (in promise) http://homeassistant.local:8123/browser_mod.js?automatically-added

and this:

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'find')
    at eval (eval at <anonymous> (flex-table-card.js?hacstag=156292058077:411:42), <anonymous>:1:9)
    at flex-table-card.js?hacstag=156292058077:411:42
    at Array.map (<anonymous>)
    at DataRow.render_data (flex-table-card.js?hacstag=156292058077:400:35)
    at flex-table-card.js?hacstag=156292058077:120:47
    at Array.map (<anonymous>)
    at DataTable.add (flex-table-card.js?hacstag=156292058077:120:32)
    at flex-table-card.js?hacstag=156292058077:704:26
    at Array.forEach (<anonymous>)
    at FlexTableCard._fill_card (flex-table-card.js?hacstag=156292058077:702:18)
VM1813:1 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'find')
    at eval (eval at <anonymous> (flex-table-card.js?hacstag=156292058077:411:42), <anonymous>:1:9)
    at flex-table-card.js?hacstag=156292058077:411:42
    at Array.map (<anonymous>)
    at DataRow.render_data (flex-table-card.js?hacstag=156292058077:400:35)
    at flex-table-card.js?hacstag=156292058077:120:47
    at Array.map (<anonymous>)
    at DataTable.add (flex-table-card.js?hacstag=156292058077:120:32)
    at flex-table-card.js?hacstag=156292058077:704:26
    at Array.forEach (<anonymous>)
    at FlexTableCard._fill_card (flex-table-card.js?hacstag=156292058077:702:18)

But I got this error on all sites.

OK, good info.
Using the Developer tools, can you enter this template and take a snapshot or copy the resulting entities?

{%- for state in states -%}
{%- if "sensor.nhl" in state.entity_id -%}
- {{state.entity_id + "\n"}}
{%- endif -%}
{%- endfor -%}

Like this:

Note, I am not suggesting yours should match this BUT what I am looking for is whether the entity set and excluded entity list are correct. the excluded entity list needs to exclude anything not relevant to the nhl_settings.

For instance, if you (for something else) created some sensor like sensor.nhl_foo_bar and did not list it in the excluded ones, it would lead to an error like this because it is not in ESPN standard structure.

This is the result:


- sensor.nhl_east_atlantic
- sensor.nhl_east_metropolitan
- sensor.nhl_west_central
- sensor.nhl_west_pacific
- sensor.nhl_wildcard_standings
- sensor.nhl_starting_goalies
- sensor.nhl_wildcard
- sensor.nhl_standings
- binary_sensor.nhl_east_atlantic
- binary_sensor.nhl_east_metropolitan
- binary_sensor.nhl_west_central
- binary_sensor.nhl_west_pacific
- sensor.nhl_po_games
- sensor.nhl_po_amer_games
- sensor.nhl_po_natl_games
- sensor.nhl_po_amer_wc_games
- sensor.nhl_po_natl_wc_games
- sensor.nhl_po_amer_div_games
- sensor.nhl_po_natl_div_games
- sensor.nhl_po_amer_leag_games
- sensor.nhl_po_natl_leag_games
- sensor.nhl_po_world_game
- sensor.nhl_po_tv_coverage
- sensor.nhl_playoff_seeds
- sensor.nhl_po_team_games
- sensor.nhl_wildcard_2
- sensor.nhl_po_standings
- sensor.nhl_standings_postseason
- sensor.nhl_schedule

Ok I understand now with the following code it works again:

type:%20custom%3Adecluttering-card%0Atemplate%3A%20nhl_settings%0Avariables%3A%0A%20%20-%20title%3A%20Overall%0A%20%20-%20entity%3A%20sensor.nhl_*_*%0A%20%20-%20attribute%3A%20entries%0A%20%20-%20excluded_entities%3A%0A%20%20%20%20%20%20-%20sensor.nhl_starting_goalies%0A%20%20%20%20%20%20-%20sensor.nhl_wildcard%0A%20%20%20%20%20%20-%20sensor.nhl_wildcard_standing%0A%20%20%20%20%20%20-%20sensor.nhl_po_games%0A%20%20%20%20%20%20-%20sensor.nhl_po_amer_games%0A%20%20%20%20%20%20-%20sensor.nhl_po_natl_games%0A%20%20%20%20%20%20-%20sensor.nhl_po_amer_wc_games%0A%20%20%20%20%20%20-%20sensor.nhl_po_natl_wc_games%0A%20%20%20%20%20%20-%20sensor.nhl_po_amer_div_games%0A%20%20%20%20%20%20-%20sensor.nhl_po_natl_div_games%0A%20%20%20%20%20%20-%20sensor.nhl_po_amer_leag_games%0A%20%20%20%20%20%20-%20sensor.nhl_po_natl_leag_games%0A%20%20%20%20%20%20-%20sensor.nhl_po_world_game%0A%20%20%20%20%20%20-%20sensor.nhl_po_tv_coverage%0A%20%20%20%20%20%20-%20sensor.nhl_playoff_seeds%0A%20%20%20%20%20%20-%20sensor.nhl_po_team_games%0A%20%20%20%20%20%20-%20sensor.nhl_wildcard_2%0A%20%20%20%20%20%20-%20sensor.nhl_po_standings%0A%20%20%20%20%20%20-%20sensor.nhl_standings_postseason%0A%20%20%20%20%20%20-%20sensor.nhl_schedule%0A%20%20-%20sort%3A%20x.stats.find(y=%3Ey.shortDisplayName%20==%20'PTS').value%0A

Thank you so mutch

1 Like

Great. So it is the other sensors that have a similar name that are not filtered out (excluded). Glad it is back to working!

1 Like

Just found out about this last night and was able to get it set up on my system. I love it. it looks great. Only recommendation or maybe suggestion would be to be able to change the colors of the tabs. Would it be possible to theme it similar to how you select an overall theme for home assistant or select the themes of various cards? Admittedly I am a very basic user so no clue how hard this would be?

Thanks again!

All depends on what you wish to change.
Look that the cards:

          type: custom:tabbed-card
          styles:
            '--mdc-theme-primary': green
            '--mdc-tab-text-label-color-default': silver
            '--mdc-typography-button-font-size': 12px
          tabs:

That is a start for tabs.

Well look at this! I figured there was a way, i’m just code illiterate! Very awesome setup!

any update?
image

  - name: Team
    ata: standings
    modify: >-
      '<div><img src="' + x.team.logos[0].href + '" style="height:
      20px;vertical-align:middle;">&nbsp;' + x.team.displayName + '</div>'

Not clear … but you might be missing another layer or need to adjust paths.

It all depends on what “x” is in your code which you have not shown.

children->standings->entries->team

You text shows that you have “ata: Standings”, should that not be “data: standings”? But then you would still be missing “entries”.

this still works for me

          - name: Team
            data: standings
            modify: "'<div><img src=\"' + x.team.logos[0].href + '\" style=\"height: 20px;vertical-align:middle;\">&nbsp;' + x.team.displayName + '</div>'"    

there is a typo with “ata” which should be “data” or?

1 Like

not for me unfortunately. my preview just freezes and there are no logos.

College Football Season is right around the corner and I’m super hyped.

Has anybody tried or even completed an CFB version of this awesome dashboard?

Any idea or workaround why there can’t be more than 4 tabs in a first row?

e.g. if you want to implement a fifth league.

It’s shown ony my mobile device but not on my desktop or tablet view