Real-Time Sports Scores w/ TeamTracker and TeamTracker-Card (Beta)

tv_network is “NBC” so I m missing the point … oh. You expect that populated for your soccer match as you showed the Bears game.

Is it even on TV anywhere?

Yes, I watched the game on TNT, it showed up as an attribute for NFL which I added for testing, but not for Soccer.

image

So, the screenshot you show is not matching what is in the data available?

Where is that screenshot from?

Oh, I see now. It might be that ESPN is not displaying the same data that it is providing. Odd!

Might be a question for ESPN. :rofl:

If the API returns a value for tv_network, it will be populated. If no value is provided, it will be set to null.

🫠 got it, thanks.

I’ve done it both ways. I ended up on creating presets that use the team name, so I can automate in node red. I found that the API provided colors didn’t work well, as they are often very “dark”. If I find time, I would like to find a solution to change the colors to something better suited for rgb lights.

1 Like

I manage my automations with Node Red. I’m looking for an elegant way to reduce the noise of pinging the API repeatedly when no games are going. Does anyone know of a way to do this? I use the trigger node currently and gate it based on what’s happening (active game, etc), but I have to have it hitting the API even on days/times when there are no games. I’m using some cron nodes to limit the times it fires to known days (Monday, Thursday, Sunday for NFL, etc), but always looking for ways to clean things up. Would love to see/hear what others are doing to manage automation, specifically in Node Red.

Is there any way to follow a team in all soccer leagues without creating the team sensor for each league individually?

It pings every 10 minutes until it gets within 20 minutes of an event and then pings every 5 seconds during the game until it completes If you have multiple sensors in the same league, it will reuse the data across them instead of re-calling the API.

If you want to change the intervals, you should change the following lines in the __init__.py file. Of course if you make the interval too big the game will start and you won’t know it because the API won’t be called.

            # update the interval based on flag
            if data["private_fast_refresh"]:
                self.update_interval = timedelta(seconds=5)
            else:
                self.update_interval = timedelta(minutes=10)

Unfortunately you need to create a separate sensor for each league. That’s the way the APIs are set up.

1 Like

Thank you!!!

Seems like it’s only limited to Soccer, as I see “Specific Team” api is available for NFL, NBA, etc…

That is great to know and a fantastic way to handle the API calls. I still like to reduce the overall noise I create in NR, so I’ve come up with a decent solution, but not having to worry about flooding the API is great.

Teams in the NFL and NBA only play in a single league. It’s only soccer, maybe cricket, and some national teams that run into problems because they play in multiple leagues/tournaments.

:+1: Understood

I want to follow soccer teams in different leagues. To create the sensors I have to use a customized resource of the team tracker integration. By doing that the attributes are created automatically under a generic league named “XXX”. Is there a way to modify this condition? That part is important because I need to filter the league to separate the games per league. Thanks in advance.

if I select German Language in home assistant, the cards don’t really work well (sometimes they show, with less info, NFL example: no down info, no “ticker” no win probability, or they don’t show at all)
if I select English, all works well.
And I needed to manually install the tracker card under resources…

this is just a side info to whoever might have similar issues

I’m not sure what you are trying to do but can you accomplish the same thing by including the league in your naming convention for the sensor and then filtering on that?

The idea is good but I don’t know how to write down the code to filter the games by the name convention/friendly name (my code is setup to filter by the name of the league). Could you help me on that?

I start my entity names with a unique string to ID the league and use something like the following if statement where LEAGUEID_ is that unique string in replacement for your underlined code:

filter:
  template: |
    {%- for team in integration_entities("teamtracker") -%}
        {%- if "sensor.LEAGUEID_" in team -%}

What does this give you?

{%- for team in integration_entities(“teamtracker”) -%}
{%- if state_attr(team, ‘league’) == “XXX” -%}
{{ state_attr(team, ‘friendly_name’) }}
{% endif %} {% endfor %}