Sports Standings and Scores

Yeah. Sorry. I was chasing the ‘wrong’ team thing. I get it. All good.

i actually think this will work better than just a “Red Zone” tab. I was forcing teams onto and off the red zone list and I noticed that the standard teamtracker view updated red almost immediately but the view that only had red zone teams sometimes left one behind. I think this should update every 5 seconds if I read the documentation right so we shall see.

I have not had a chance to look it over yet. But, will when I can.

Now to see if it turns on/off … and it does!
Now to see if the change I made will flag either team, so need Ravens to get in red zone.

And it works!

I will post all of this later tonight/tomorrow but now we have Red Zone.

Great news so far. Sorry, I have not had a chance to look at it or watch it. But, I love seeing this!

I like it like this! Waiting for Thursday now for better testing beyond one game.

image

Note: Just a test … I made every card be like that to test my card-mod code.

Hello -

I have a quick, but probably dumb question, but I i figured Id ask anyway.

I just did direct copies of your GitHub.

I placed sensors in my sensors folder, and all the teams are discovered as I could make my own nfl-cards.

However, the dashboard is not loading any details. Take a look at the screenshots below.

I have my template exactly where yours would be located (or so I think it is).

Screenshot 2023-09-15 094350

also in the template, I get the following as well.

{{ state_attr('sensor.nhl_east_atlantic','entries')[0].stats }} = UndefinedError: None has no element 0

{{ state_attr('sensor.nhl_east_atlantic','entries') }} = null

Any thoughts

The rest sensors and all teamtracker items come into sensor.

The breakdown of the stats come into template. You have them in a file in the www folder. I can’t see the filename. But, your template !include is template.yaml.

As @jeffcrum says, based on what you have shown all your includes should be in the same folder as you have the configuration YAML

I think i know what I did wrong… when I get home ill give it a go and see if i Was correct.

To me it looks like the indentation on the YAML is wrong.
You should copy and post it using the </> above and not a screen image,

it was wrong. I just created a split config and tested it, its working. TY

1 Like

I cannot get the sensors to work! Pulling my hair out. Placed your sensor.yaml and template.yaml file in the same dir and configuration.yaml. Edit configuration.yaml to include both files. Aaaaand nothing…

And you restarted to get the sensors to load?

Made a little progress - my test HA environment is running in a VM on Unraid and not working - although my production HA in Synology docker is giving me some sensor data (so that must be a permissions issue on some files maybe). Still getting a blank table though as well as template errors in log

Template variable error: ‘value_json’ is undefined when rendering ‘{{ value_json.pageProps.date }}’

1:00:09 PM – (ERROR) helpers/template.py

Invalid config for [template]: [name] is an invalid option for [template]. Check: template->name. (See /config/include/template.yaml, line 513).

12:59:58 PM – (ERROR) config.py - message first occurred at 12:59:58 PM and shows up 25 times

Edit - seems to be the Standings tab that is not showing data

What does line 513 look like? Show us five lines above and below with it please.

Line 513 is where the NBA Division attributes are it looks like

entries: “{{ state_attr(‘sensor.nba_standings’,‘children’)[0][‘children’][0][‘standings’][‘entries’] }}”

* name: NBA Eastern Central
unique_id: sensor.nba_eastern_central
state: “{{ now() }}”
attributes:
entries: “{{ state_attr(‘sensor.nba_standings’,‘children’)[0][‘children’][1][‘standings’][‘entries’] }}”
* name: NBA Eastern Southeast
unique_id: sensor.nba_eastern_southeast
state: “{{ now() }}”
attributes:

Please post you code using the </> icon so that we can see the indentation you have. Otherwise we cannot diagnose the issue.

trying to edit

I think you put the crap code into the code block.

Can you repaste from your yaml in there please.