OK, you either need to reload “templates” or restart HA. If the full stats are there and not the divisions, you get nothing. Also, if you do not see the divisions one … be sure that the first line in template.yaml is:
sensor:
You may have copied it before I added it in the original post, I added it in an edit. Look above for the template.yaml and be sure that is the first line. After I edit such things I always run check configuration too, it does help to identify issues. If it isn;t there at all to see states, it is defined wrong in YAML, if it is there and no data … then that needs to be addressed to see why.
Boom! That was it. Standings are now populated for all sports. Goalies all say undefined for NHL though. Do the other tabs only get populated when there is data? for example the live tab is just blank for all. Thanks for the help!
The tabs Postgame, Live and Pregame are just organizing Teamtracker. The other tabs for standings are mine I wrote. So like NFL, NHL would have POST and PRE but nothing LIVE. In fact, no sport is playing right now so all LIVE would be empty.
You would note that not even Monday’s game is populated yet. This is an ESPN thing, we can only serve up what ESPN gives.
If you want starting goalies, that is some new stuff. Create a scrape sensor to get their ever changing “cookie”: For this, I add in configuration.yaml:
scrape: !include scrape.yaml
Then add a scrape sensor to get the cookie. This is in scrape.yaml which is now another include like the other includes:
OK, pre/post and (of course live)?
Then your naming is not the same as mine or done in a different way.
if you go to Developer’s Tools and template and put this in:
{% for team in integration_entities("teamtracker") %}
{{team }}
{%- endfor %}
OK. Did you create the red zone sensor? If not it will error and you will get nothing. If you did, examine the states of sensor.nfl_red_zone … if you didn;t we need to remove that test in the decluttering template. Note: It would be there and return nothing as no NFL team is in the Red ZOne right now. If that sensor does not exist, then you didn;t create it
I would remove it from the dashboard for now. If you look into the dashboard code in the decluttering templates, change the game_stats: template to remove the test for red zone like this:
filter:
template: |
{%- for team in integration_entities("teamtracker") -%}
{%- if state_attr(team, "league") == "[[sport]]" -%}
{%- if states(team) == "[[status]]" -%}
{%- if state_attr(team, "team_homeaway") == "home" -%}
{{{"type": "custom:teamtracker-card",
"entity": team,
"home_side": "right"}}},
{%- endif -%}
{%- endif -%}
{%- endif -%}
{%- endfor -%}
You can add it back once you can figure out what is wrong with the sensor for the red zone teams. The only thing that template is used for is to draw the teamtracker cards with red border and background when an NFL team is in the red zone. You have a problem or that sensor is not setup and hence it fails and so would every teamtracker card.
No look toward the top if editing the whole dashboard. Look for the decluttering templates an specifically the one named “game_stats”. Under that, just replace the filter: