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