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

First post, i hope im doing this right…
just installed teamtracker and teamtracker card, both showing installed in HACS.
when i attempt to add the card to a dashboard i see the error
Custom element doesn’t exist: teamtracker-card

inside www/community/ha-teamtracker-card i see ha-teamtracker-card.js and teamtracker-card.js

i have restarted

Might just be a case of having to clear your browser cache…tends to be needed after installing/updating a custom card

Make sure you added the card to your resources list. If your dashboard is YAML controlled then you have to edit the YAML file manually. If your dashboard is controlled from the frontend then go to the 3 dot menu in the upper right corner of your dashboard, edit the dashboard, click the menu again and edit resources and add it there.

ESPN changed their JSON format for Tennis earlier this year and it broke the sensor. I finally got around to fixing it and it seems to be working again.

There is a slight possibility that something with one of the other sports broke with these changes to let me know if there are any problems.

You must be on v0.10.x of both the sensor and the card for Tennis to work.

1 Like

hello, thx for the work. I tried to add Paris-Saint-Germain in Team Tracker. I add it with the UI but it’s don’t go. I don’t know with. I search in espn website to the abbreviation off Paris-Saint-Germain and it’s PSG.



I don’t know what I do false. I added an other team from the LIG1 in team tracker with succès.

How did you get the teams spread out over the whole page? When i pasted your code i get 4 very smashed together columns

His auto-entities is probably inside a vertical stack card.

Which tab are you talking about? The Teamtracker live scores or?

It looks like PSG’s next Ligue 1 game isn’t until 1/14. The API doesn’t return games that far in the future.

Their game against Revel on 1/7 is not a Ligue 1 game and so it will not be returned by the standard Ligue 1 API.

You have to configure a separate sensor using a custom API configuration for that tournament. Try league_path = fra.super_cup if you want to do that.

1 Like

Yes the next ligue1 play the 14/1 but the other team that I have add have all the infos and there are almost play the 13/1.


Ok I will test the custom sensor

The fact Strasburg are there in the API doesn’t negate the fact that PSG’s next game isn’t there yet

http://site.api.espn.com/apis/site/v2/sports/soccer/fra.1/scoreboard

Here’s what the API says for Ligue 1 at the moment

{"leagues":[{"id":"710","uid":"s:600~l:710","name":"French Ligue 1","abbreviation":"Ligue 1","midsizeName":"FRA.1","slug":"fra.1","season":{"year":2023,"startDate":"2023-07-01T04:00Z","endDate":"2024-07-01T03:59Z","displayName":"2023-24 French Ligue 1","type":{"id":"1","type":11943,"name":"2023-24 Ligue 1","abbreviation":"2023-24 Ligue 1"}},"logos":[{"href":"https://a.espncdn.com/i/leaguelogos/soccer/500/9.png","width":500,"height":500,"alt":"","rel":["full","default"],"lastUpdated":"2019-05-08T16:07Z"},{"href":"https://a.espncdn.com/i/leaguelogos/soccer/500-dark/9.png","width":500,"height":500,"alt":"","rel":["full","dark"],"lastUpdated":"2019-05-08T16:07Z"}],"calendarType":"day","calendarIsWhitelist":true,"calendarStartDate":"2023-07-01T04:00Z","calendarEndDate":"2024-07-01T03:59Z","calendar":["2023-08-11T07:00Z","2023-08-12T07:00Z","2023-08-13T07:00Z","2023-08-18T07:00Z","2023-08-19T07:00Z","2023-08-20T07:00Z","2023-08-25T07:00Z","2023-08-26T07:00Z","2023-08-27T07:00Z","2023-09-01T07:00Z","2023-09-02T07:00Z","2023-09-03T07:00Z","2023-09-15T07:00Z","2023-09-16T07:00Z","2023-09-17T07:00Z","2023-09-22T07:00Z","2023-09-23T07:00Z","2023-09-24T07:00Z","2023-09-26T07:00Z","2023-09-29T07:00Z","2023-09-30T07:00Z","2023-10-01T07:00Z","2023-10-06T07:00Z","2023-10-07T07:00Z","2023-10-08T07:00Z","2023-10-20T07:00Z","2023-10-21T07:00Z","2023-10-22T07:00Z","2023-10-27T07:00Z","2023-10-28T07:00Z","2023-10-29T07:00Z","2023-11-03T07:00Z","2023-11-04T07:00Z","2023-11-05T07:00Z","2023-11-10T08:00Z","2023-11-11T08:00Z","2023-11-12T08:00Z","2023-11-24T08:00Z","2023-11-25T08:00Z","2023-11-26T08:00Z","2023-11-29T08:00Z","2023-12-01T08:00Z","2023-12-02T08:00Z","2023-12-03T08:00Z","2023-12-06T08:00Z","2023-12-07T08:00Z","2023-12-08T08:00Z","2023-12-09T08:00Z","2023-12-10T08:00Z","2023-12-15T08:00Z","2023-12-16T08:00Z","2023-12-17T08:00Z","2023-12-20T08:00Z","2024-01-12T08:00Z","2024-01-13T08:00Z","2024-01-14T08:00Z","2024-01-26T08:00Z","2024-01-27T08:00Z","2024-01-28T08:00Z","2024-02-02T08:00Z","2024-02-03T08:00Z","2024-02-04T08:00Z","2024-02-11T08:00Z","2024-02-18T08:00Z","2024-02-25T08:00Z","2024-03-03T08:00Z","2024-03-10T08:00Z","2024-03-17T07:00Z","2024-03-31T07:00Z","2024-04-07T07:00Z","2024-04-14T07:00Z","2024-04-21T07:00Z","2024-04-28T07:00Z","2024-05-03T07:00Z","2024-05-11T07:00Z","2024-05-18T07:00Z"]}],"season":{"type":11943,"year":2023},"day":{"date":"2024-01-12"},"events":[{"id":"677419","uid":"s:600~l:710~e:677419","date":"2024-01-12T20:00Z","name":"Strasbourg at Marseille","shortName":"STR @ OLM","season":{"year":2023,"type":11943,"slug":"2023-24-ligue-1"},"competitions":[{"id":"677419","uid":"s:600~l:710~e:677419~c:677419","date":"2024-01-12T20:00Z","startDate":"2024-01-12T20:00Z","attendance":0,"timeValid":true,"recent":false,"status":{"clock":0.0,"displayClock":"0'","type":{"id":"1","name":"STATUS_SCHEDULED","state":"pre","completed":false,"description":"Scheduled","detail":"Fri, January 12th at 3:00 PM EST","shortDetail":"Scheduled"}},"venue":{"id":"2333","fullName":"Orange Vélodrome","address":{"city":"Marseille","country":"France"}},"format":{"regulation":{"periods":2}},"notes":[],"geoBroadcasts":[],"broadcasts":[],"competitors":[{"id":"176","uid":"s:600~t:176","type":"team","order":0,"homeAway":"home","winner":false,"form":"DWLWW","score":"0","records":[{"name":"All Splits","type":"total","summary":"7-6-4","abbreviation":"Total"}],"team":{"id":"176","uid":"s:600~t:176","abbreviation":"OLM","displayName":"Marseille","shortDisplayName":"Marseille","name":"Marseille","location":"Marseille","color":"ffffff","alternateColor":"00509f","isActive":true,"logo":"https://a.espncdn.com/i/teamlogos/soccer/500/176.png","links":[{"rel":["clubhouse","desktop","team"],"href":"https://www.espn.com/soccer/club/_/id/176/marseille","text":"Clubhouse","isExternal":false,"isPremium":false,"isHidden":false},{"rel":["stats","desktop","team"],"href":"https://www.espn.com/soccer/team/stats/_/id/176/marseille","text":"Stats","isExternal":false,"isPremium":false,"isHidden":false},{"rel":["schedule","desktop","team"],"href":"https://www.espn.com/soccer/team/fixtures/_/id/176/marseille","text":"Fixtures","isExternal":false,"isPremium":false,"isHidden":false},{"rel":["squad","desktop","team"],"href":"https://www.espn.com/soccer/team/squad/_/id/176/marseille","text":"Squad","isExternal":false,"isPremium":false,"isHidden":false}],"venue":{"id":"2333"}},"statistics":[],"leaders":[{"name":"goals","displayName":"Goals","shortDisplayName":"Goals","abbreviation":"G","leaders":[{"displayValue":"5","value":5.0,"athlete":{"id":"122260","displayName":"Pierre-Emerick Aubameyang","shortName":"P Aubameyang","fullName":"Pierre-Emerick Aubameyang","jersey":"10","active":true,"team":{"id":"176"},"links":[{"rel":["playercard","desktop","athlete"],"href":"http://www.espn.com/soccer/player/_/id/122260/pierre-emerick-aubameyang","isHidden":false}],"position":{"abbreviation":"F"}},"team":{"id":"176"}}]},{"name":"goalsLeaders","displayName":"Goals","shortDisplayName":"Goals","abbreviation":"G","leaders":[{"displayValue":"5","value":5.0,"athlete":{"id":"122260","displayName":"Pierre-Emerick Aubameyang","shortName":"P Aubameyang","fullName":"Pierre-Emerick Aubameyang","jersey":"10","active":true,"team":{"id":"176"},"links":[{"rel":["playercard","desktop","athlete"],"href":"http://www.espn.com/soccer/player/_/id/122260/pierre-emerick-aubameyang","isHidden":false}],"position":{"abbreviation":"F"}},"team":{"id":"176"}}]}]},{"id":"180","uid":"s:600~t:180","type":"team","order":1,"homeAway":"away","winner":false,"form":"WWWWD","score":"0","records":[{"name":"All Splits","type":"total","summary":"6-5-6","abbreviation":"Total"}],"team":{"id":"180","uid":"s:600~t:180","abbreviation":"STR","displayName":"Strasbourg","shortDisplayName":"Strasbourg","name":"Strasbourg","location":"Strasbourg","color":"0000bf","alternateColor":"ffffff","isActive":true,"logo":"https://a.espncdn.com/i/teamlogos/soccer/500/180.png","links":[{"rel":["clubhouse","desktop","team"],"href":"https://www.espn.com/soccer/club/_/id/180/strasbourg","text":"Clubhouse","isExternal":false,"isPremium":false,"isHidden":false},{"rel":["stats","desktop","team"],"href":"https://www.espn.com/soccer/team/stats/_/id/180/strasbourg","text":"Stats","isExternal":false,"isPremium":false,"isHidden":false},{"rel":["schedule","desktop","team"],"href":"https://www.espn.com/soccer/team/fixtures/_/id/180/strasbourg","text":"Fixtures","isExternal":false,"isPremium":false,"isHidden":false},{"rel":["squad","desktop","team"],"href":"https://www.espn.com/soccer/team/squad/_/id/180/strasbourg","text":"Squad","isExternal":false,"isPremium":false,"isHidden":false}],"venue":{"id":"2980"}},"statistics":[],"leaders":[{"name":"goals","displayName":"Goals","shortDisplayName":"Goals","abbreviation":"G","leaders":[{"displayValue":"4","value":4.0,"athlete":{"id":"304871","displayName":"Emanuel Emegha","shortName":"E Emegha","fullName":"Emanuel Emegha","jersey":"10","active":true,"team":{"id":"180"},"headshot":"https://a.espncdn.com/i/headshots/soccer/players/full/304871.png","links":[{"rel":["playercard","desktop","athlete"],"href":"http://www.espn.com/soccer/player/_/id/304871/emanuel-emegha","isHidden":false}],"position":{"abbreviation":"F"}},"team":{"id":"180"}}]},{"name":"goalsLeaders","displayName":"Goals","shortDisplayName":"Goals","abbreviation":"G","leaders":[{"displayValue":"4","value":4.0,"athlete":{"id":"304871","displayName":"Emanuel Emegha","shortName":"E Emegha","fullName":"Emanuel Emegha","jersey":"10","active":true,"team":{"id":"180"},"headshot":"https://a.espncdn.com/i/headshots/soccer/players/full/304871.png","links":[{"rel":["playercard","desktop","athlete"],"href":"http://www.espn.com/soccer/player/_/id/304871/emanuel-emegha","isHidden":false}],"position":{"abbreviation":"F"}},"team":{"id":"180"}}]}]}],"details":[],"odds":[{"provider":{"id":"2000","name":"Bet 365","priority":0},"awayTeamOdds":{"summary":"19/4","value":5.75,"handicap":0.0,"team":{"id":"180","uid":"s:600~t:180","abbreviation":"STR","displayName":"Strasbourg","logo":"https://a.espncdn.com/i/teamlogos/soccer/500/180.png"},"link":{"language":"en-US","rel":["away","desktop","bets","bet-365"],"href":"https://www.bet365.com/dl/sportsbookredirect?affiliate=365_307577&bet=1&bs=148315964-1778674633~19/4","text":"Away Bet","shortText":"Away Bet","isExternal":true,"isPremium":false,"isHidden":false}},"homeTeamOdds":{"summary":"1/2","value":1.5,"handicap":0.0,"team":{"id":"176","uid":"s:600~t:176","abbreviation":"OLM","displayName":"Marseille","logo":"https://a.espncdn.com/i/teamlogos/soccer/500/176.png"},"link":{"language":"en-US","rel":["home","desktop","bets","bet-365"],"href":"https://www.bet365.com/dl/sportsbookredirect?affiliate=365_307577&bet=1&bs=148315964-1778674631~1/2","text":"Home Bet","shortText":"Home Bet","isExternal":true,"isPremium":false,"isHidden":false}},"drawOdds":{"summary":"7/2","value":4.5,"handicap":0.0,"link":{"language":"en-US","rel":["draw","desktop","bets","bet-365"],"href":"https://www.bet365.com/dl/sportsbookredirect?affiliate=365_307577&bet=1&bs=148315964-1778674632~7/2","text":"Draw Bet","shortText":"Draw Bet","isExternal":true,"isPremium":false,"isHidden":false}}},{"overUnder":2.5,"provider":{"id":"58","name":"ESPN BET","priority":1},"drawOdds":{"moneyLine":340,"link":{"language":"en-US","rel":["draw","desktop","bets","espn-bet"],"href":"https://espnbet.app.link?$canonical_url=/sport/soccer/organization/france/competition/ligue-1/event/d853f58e-425b-4c43-ac4b-f9d515878c59","text":"Draw Bet","shortText":"Draw Bet","isExternal":true,"isPremium":false,"isHidden":false}},"details":"OLM -210"},{"overUnder":4.5,"provider":{"id":"1001","name":"accuscore","priority":0},"awayTeamOdds":{"favorite":false,"underdog":true,"moneyLine":475,"spreadOdds":102.0,"team":{"id":"180","uid":"s:600~t:180","abbreviation":"STR","displayName":"Strasbourg","logo":"https://a.espncdn.com/i/teamlogos/soccer/500/180.png"}},"homeTeamOdds":{"favorite":true,"underdog":false,"moneyLine":-200,"spreadOdds":-114.0,"team":{"id":"176","uid":"s:600~t:176","abbreviation":"OLM","displayName":"Marseille","logo":"https://a.espncdn.com/i/teamlogos/soccer/500/176.png"}},"drawOdds":{"moneyLine":350},"details":"OLM -200"}],"wasSuspended":false,"playByPlayAvailable":true,"playByPlayAthletes":true}],"status":{"clock":0.0,"displayClock":"0'","type":{"id":"1","name":"STATUS_SCHEDULED","state":"pre","completed":false,"description":"Scheduled","detail":"Fri, January 12th at 3:00 PM EST","shortDetail":"Scheduled"}},"venue":{"displayName":"Orange Vélodrome"},"links":[{"language":"en-US","rel":["summary","desktop","event"],"href":"https://www.espn.com/soccer/match/_/gameId/677419","text":"Summary","shortText":"Summary","isExternal":false,"isPremium":false,"isHidden":false},{"language":"en-US","rel":["stats","desktop","event"],"href":"https://www.espn.com/soccer/matchstats/_/gameId/677419","text":"Statistics","shortText":"Statistics","isExternal":false,"isPremium":false,"isHidden":false}]}]}

1 Like

My Teamtracker has stopped working since the last update although i didnt change anything. It says “sensor.bulls unavailable”. Anybody experienced the same or can help?

What version are you on? Set up w/ UI or YAML? If YAML, what YAML are you using? Anything in the logs?

This is from my configuration.yaml
#Teamtracker

  • platform: teamtracker
    league_id: “NFL”
    team_id: “SEA”
    name: “seahawks”
    api_language: en

  • platform: teamtracker
    league_id: “NBA”
    team_id: “CHI”
    name: “bulls”
    api_language: en

  • platform: teamtracker
    league_id: “NFL”
    team_id: “PHI”
    name: “eagles”
    api_language: en

and this from my dashboard:
type: custom:teamtracker-card
entity: sensor.eagles
outline: true
outline_color: ‘#ffe500

I am on Version v.0.11.0

Ok thank for the response

1 Like

Assuming no auto-formatting occurred when you copied and pasted the YAML, it looks like you are using the wrong type of quotes in your YAML. Either delete them completely or change them so they are the standard quote or double quote on both sides and not the different type to start a string and stop the string.

Once I removed them, your YAML worked fine for me.

  • platform: teamtracker
    league_id: NBA
    team_id: CHI
    name: test_tt_all_teste03
    api_language: en

Agreed, Because if your team is New Orleans Saints and the abbreviation is NO … then you are in trouble UNLESS you use quotes. Quoted entries should work no problem and in fact I would recommend them unless you have no teams named like NO, YES, TRUE, OFF, ON …

They are in trouble more than needing quotes :rofl:

Hey, I am a Lions Fan so … gonna be a ride!

1 Like

someone can tell me if i can make this code better? i wanna show up the Soccer table and i get these error:

State attributes for sensor.1_bundesliga exceed maximum size of 16384 bytes. This can cause database performance issues; Attributes will not be stored

#TeamTracker
resource: https://site.web.api.espn.com/apis/v2/sports/soccer/ger.1/standings
sensor:
  - name: "1. Bundesliga"
    value_template: "{{ now() }}"
    json_attributes_path: "$['children'][0]['standings']"
    json_attributes:
      - entries