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

Hi,

I’ve been using a much older version of the ha-teamtracker-card. I made tweaks to the card to fit it on my dashboard, so I haven’t updated from HACS in a long time. I noticed the newest version of the card is much different with different with multiple files for in, pre, post, etc. Where mine only has ha-teamtracker-card.js

Recently my card stopped working and can’t figure out why. The newest version does work. I assume something broke the old version with an update. Does anyone have any advice to get the earliest version of this component with one js file working again?

Thanks :slight_smile:

Not 100% sure what you need, but the Releases page on GitHub should have older versions

in welche datei kommt der code ?
ist es eigendlich möglich das die partien automatisch neu erstellt werden nach einem spiel tag ?
habe eine tabbele drin die stimmt aber nicht das torverhältnis passt nicht und die punkte auch nicht

First of all thank you @vasqued2 and all others involved for this great project! Easy to integrate and to setup well documented.

One tiny thing that bothers me is that in case your team hasn’t any matches in the upcoming days and therefore tracker state is NOT_FOUND, the espn leaves the state attributes more or less null and the lovelace card just shows some minimal information and the (in my case ungly) league logo.

Of course there are several ways to keep the card from showing in this case (i.e. conditional card), but on my sports panel i wanted them to also show the information that there isn’t any game soon.

Anyway since the card only displays the espn ID and the league logo (at least for soccer) i decided to change the state attributes when the team_tracker state is NOT_FOUND.

I use python script Home Assistant Entities Script to change the attributes for league_logo to team logo and team_abbr to Team Name by automation each time the integration updates the tracker.

Just in case someone has a similar request maybe this information helps to achieve your goal.

automation:

- id: set_logo_tracker_vfl
  alias: Tracker Logo VFL to VFL
  mode: single
  trigger:
    - platform: state
      entity_id:
        - sensor.team_tracker_vfl
      attribute: last_update
  condition:
    - condition: state
      entity_id: sensor.team_tracker_vfl
      state: NOT_FOUND  
  action:
    - service: python_script.hass_entities
      data:
        action: set_state_attributes
        entity_id: sensor.team_tracker_vfl
        state: NOT_FOUND
        attributes:
          - league_logo: https://a.espncdn.com/combiner/i?img=/i/teamlogos/soccer/500/7013.png
          - team_name: VFL
          - team_abbr: VFL

Result:

3 Likes

Into your configuration.yaml but also possible in the integartion panel.

Thanks for the response.

When I download the earliest version from HACS (v0.62), I restart home assistant, clear cache, open and close browser. The teamtracker card does not load after.

If I use the newest version it works fine.

No problem if I can’t use the earlier version, I’ll find a work around :slight_smile:

Am getting out of my depth here but would guess it’s an issue with your Resources settings for your Dashboards. In HA go to Settings > Dashboards then overflow/“three dots menu” and Resources and you’ll see what you’ve added already.

Probably the newest/latest card’s “resource” is in there as you’ve had this installed so the older version you’ve loaded doesn’t register…
Open to someone wiser than me inputting but think what you need to do is either…remove the existing resource entry, refresh and then re add it and refresh again (see Manual Install Instructions for card) OR edit the existing resource entry changing the reference after the ‘?’ so HA recognises a new/changed card…

Good suggestion @Gav_in

I’ve tried removing and then manually adding the resource in a different location other than HACS folder.

I’ve tried changing the HACS resource with “?v=2” appended at the end.

Unfortunately no luck and the same result as before :frowning:

It’s weird that days before the older version of the card was working and stopped working without me even touching home assistant.

I tried this add-in and wanted to add de eredivisie from The Netherlands but for some reason i keep getting NOT_FOUND. Anyone here that was able to add this succesfully??

It seems i was a bit to fast with my question as it works now.

What if I want all the matches listed for a league do I have to create entities for all clubs or could i specify this another way?

@jackw.27 The sensor and card must remain on the same MINOR version level. So if you are running the card on v0.6.x, you must use the sensor w/ v0.6.x too. If you bump up the sensor to version 0.7.x or higher, you will run into incompatibilities of some sort. Maybe you have gotten lucky up until this point because some incompatibilities only impact some sports, not all.

If you revert both the sensor and card to v0.6.x, you should be fine.

Also, one of the changes I made that split out the files was to improve compatibility with card-mod, which makes it a lot easier to change the size and other aspects of the card.

Take a look at this Wiki entry for examples. Hopefully you will be able to use card-mod to resize or make whatever changes you want to make w/o locking you into a specific version going forward.

Nice update. This is how I wanted it to work. Unfortunately, when the state is NOT_FOUND, the API doesn’t return a logo for the Team, only the League logo. So the only way to get around it is to hard-card the logo API like you did.

You have to create a sensor for each team. There are examples in this thread of multiple ways to filter out which cards to display so you only display the ones you want.

1 Like

Is it possible to get the TV Channel from ESPN as well, it’s not listed as an attribute?

attribution: Data provided by ESPN

sport: soccer
league: XXX
league_logo: https://a.espncdn.com/i/leaguelogos/soccer/500/70.png
team_abbr: USA
opponent_abbr: COL
event_name: COL @ USA
date: 2023-10-29T21:30Z
kickoff_in: in an hour
venue: Snapdragon Stadium
location: San Diego, California, USA
tv_network: null
odds: USA -650
overunder: 2.5
team_name: USA
team_id: 2765
team_record: null
team_rank: null
team_homeaway: home
team_logo: https://a.espncdn.com/i/teamlogos/countries/500/usa.png
team_colors: #213065, #d42339
team_score: 0
team_win_probability: null
team_winner: false
team_timeouts: null
opponent_name: Colombia
opponent_id: 11337
opponent_record: null
opponent_rank: null
opponent_homeaway: away
opponent_logo: https://a.espncdn.com/i/teamlogos/countries/500/col.png
opponent_colors: #fbd632, #21418c
opponent_score: 0
opponent_win_probability: null
opponent_winner: false
opponent_timeouts: null
quarter: null
clock: Scheduled
possession: null
last_play: null
down_distance_text: null
outs: null
balls: null
strikes: null
on_first: null
on_second: null
on_third: null
team_shots_on_target: null
team_total_shots: null
opponent_shots_on_target: null
opponent_total_shots: null
team_sets_won: null
opponent_sets_won: null
last_update: 2023-10-29 16:23:49-04:00
api_message: null
icon: mdi:soccer
friendly_name: US Womens Int. Friendly

I believe it is provided when the game is in ‘PRE’.

But, see your post where it says:
tv_network: null

It does not seem to be provided at the time you pasted the info.

The info was copied at “PRE”, the state is currently “IN” and the attribute is still the same.

You are asking two different questions.

Do you want the Network (which only tells you something like its ESPN+) or are you thinking it would deliver to you the exact Network and if streamed the exact way to stream that exact channel?

Just whatever is available under TV I guess, it’s so I have an idea where I can watch the game.

Maybe it isn;t on? Anywhere? Like what would you see here:

TBH I didn’t have the card setup as I’m not currently using it, I guess I’ll have to wait until the next game to see.

I guess the data isn’t available for Soccer the same as it is for the NFL :frowning_face: