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

Hey there @vasqued2 . I’m trying to use the service call you provided to grab LSU football and I’m getting not found. I set it up as a normal TT sensor and I am getting data. I am able to get pro sports just fine but not NCAAF .

This is the service call I am using that is not working:

action: teamtracker.call_api
target:
  entity_id: sensor.team_tracker
data:
  team_id: LSU
  conference_id: "8"
  league_path: NCAAF
  sport_path: football

Can you take a look when you have time and let me know if I am doing something incorrectly? Thanks again for this great extension!

league_path should be college-football

action: teamtracker.call_api
target:
  entity_id: sensor.team_tracker
data:
  team_id: LSU
  conference_id: "8"
  league_path: NCAAF
  sport_path: college-football

Switched over to this and still not found. I THINK I have the other attributes set correctly.

league_path is college-football. sport-path should be kept at football.

If you look at the const.py file in the src/ directory, you can see all the combos.

1 Like

This is helpful however if double click you can open the url from the attributes tab. Is there a way to disable double click?

I wanted to display this card for my 8 year old. We have an old wall mounted tablet we use as a display. I actually blocked internet access using my router. Clicking an external url loads chrome with an error. When you exit chrome it causes Wallpannel to reload which momentary displays the sidebar were settings can be accessed.

Use card-mod to turn off pointer events.

type: custom:teamtracker-card
entity: sensor.team_tracker
show_league: true
card_mod:
  style: |
    ha-card {
      pointer-events: none;
    }

I have troubled getting. Ajax (dutch soccer) shown.

I use custom with soccer and ned.1 that works i guess. But i dont know what id to use for ajax. I tryed ajax,aja,ned.ajax and the id 136

think the code for Ajax is 139

though that said looks like it’s AJA you need…the rest seems OK (I think)

Ajax have no league games until 18th Sept so the ESPN API is unlikely to return anything until nearer the 18th so that’s not making your task any easier as all you’ll get even with a correct setup is NOT_FOUND

This.

The API is only returning matches through Sept 14th as of today, as indicated by the api_message or what is displayed on the NOT_FOUND card.

1 Like

Hello, how to differentiate two teams in French league 1 which have the same team_id like the clubs of Monaco and Montpellier => “MON”

THANKS

They won’t have the same team_id on the ESPN API…you need to get the details from there…

edit: actually looking at that they do both seem to be MON as you mention on their main page :see_no_evil::man_shrugging:t2:…maybe someone else has a bright idea as the “real” team_id must be somewhere

another edit…
so MON is Monaco…but what works for Montpellier :thinking:

and more updating…
if you create a sensor for Montpellier’s next opponent (Auxerre) it shows Montpellier correctly as the opponent but does list their abbreviation as MON…at this stage I’m stumped…

FINAL UPDATE
Ok…so I’ve overthought this…back to the Readme for the integrtation and of course we can use the "team abbreviation, team ID, athlete name, wildcard, or a regex… " so using their ID of 274 rather the abbreviation of MON works fine :partying_face:

Thank you,

It works like a charm :wink:

  - platform: teamtracker
    league_id: LIG1
    team_id: 274
    name: Ligue_1_Montpellier

  - platform: teamtracker
    league_id: LIG1
    team_id: 174
    name: Ligue_1_Monaco    
1 Like

Hi I hope somebody can help me.

I have this sensor in my configuration.yaml for soccer German 2.Bundesliga

  - platform: rest
    name: team_tracker_bund2_tabelle
    scan_interval: 3600 # 1 Tag // 3600sek = 1 Stunde
    resource: https://site.web.api.espn.com/apis/v2/sports/soccer/ger.2/standings? 
    type=0&level=0
    value_template: "{{ now() }}"
    json_attributes_path: "$['children'][0]['standings']"
    json_attributes:
      - entries

and this to display the standings on the Dashboard

type: custom:flex-table-card
entities:
  include: sensor.team_tracker_bund2_tabelle
columns:
  - name: Rang
    data: entries
    modify: x.stats[10].value
  - name: Logo
    data: entries
    modify: '''<img src="'' + x.team.logos[0].href + ''"style="width: 30%">'''
  - name: Mannschaft
    data: entries
    modify: x.team.name
  - name: Sp
    data: entries
    modify: x.stats[0].value
  - name: D
    data: entries
    modify: x.stats[2].value
  - name: Pkt
    data: entries
    modify: x.stats[3].value

I want to modify the custom:flex-table-card to display the up and down prior to previous standing like this


but I have no Idea how to do that

You should ask for help here:

In my opinion, sections is a great addition to Homeassistant UI. One piece of feedback though for this particular card is that there’s less possibility for for me to tune the size of the team tracker card to fit dashboards that are based on sections.

Maybe this is possible to tune a bit with custom CSS stuff, but then I’d be out of my depth? I’m really, really not compatible with css.

Regardless, it be great to have more possibilities to customize the size of the card to fit with different sections layouts.

The wiki explains how to use card-mod to do this.

1 Like

I think this is what you need

- name: Up-Down
  data: entries
  modify: |-
         if (x.current == x.previous)
           '<ha-icon icon="mdi:minus" >'
         else if (x.current =="0")
           '<ha-icon icon="mdi:bomb" style="color:red;" >'
         else if (x.previous == "0")
           '<div><ha-icon icon="mdi:hand-clap" style="color:blue;"></ha-icon>&nbsp;' +  "New " + '</div>';
         else if (x.current > x.previous)
           '<div><ha-icon icon="mdi:arrow-down" style="color:red;"></ha-icon>&nbsp;' +  "Dn "+ (x.current - x.previous) + '</div>';
         else if (x.current < x.previous)
           '<div><ha-icon icon="mdi:arrow-up" style="color:green;"></ha-icon>&nbsp;' + "Up "+ (x.previous - x.current) + '</div>';

I’m not the sharpest crayon in the toolbox so forgive me for asking this. I have scanned several threads and checked the wiki but I cant find out why the state_attr(team, “team_homeawat”) == “home”…) is set to only home.

Whats the logic behind that. I know what it does but why use that and leave out away games?

Thanks

Because if you only choose one (“home” is this case) you will not get two cards – one for the “home” team and one for the “away” team. That said, it all depends on the sport of interest. Like you would have two mlb entries right now (one for DET and one for CLE) instead of one which would be CLE as they are at home.

Makes sense. Thanks for the reply