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

Hello all I have searched but failed to find the answer and my “figure it out on your own skills” Suck. Hope you can help. Getting this - TemplateError(‘ValueError: Template error: as_datetime got invalid input ‘None’ when rendering template ‘{{ as_datetime(state_attr(“sensor.san_francisco_49ers”,“date”)) - timedelta( hours = 3, minutes = 0 ) }}’ but no default was specified’) while processing template ‘Template<template=({{ as_datetime(state_attr(“sensor.san_francisco_49ers”,“date”)) - timedelta( hours = 3, minutes = 0 ) }}) renders=4>’ for attribute ‘_attr_native_value’ in entity ‘sensor.pre_game_san_francisco_49ers’ Question is- Is this a error? If Yes how do I correct it. or is throwing this because the game is not within the time?
FYI I see the “this topic has been solved” thing over to the right as I type but I could not find the answer, so again thank you for helping.

You will need to post your code here.

Use the preformatted text in the settings icon:
image

In general, that is a reference to something that is missing an attribute that was being referenced.

I am not aware of an ESPN API for darts. If you find one, lmk.

any guide that shows how to use this? :slight_smile:

Start with the README in the repo. The Wiki pages cover additional topics and the FAQ page links to additional guides. There are also videos on YouTube if you search there. Google is your friend. Even ChatGPT and other LLMs gives good direction.

1 Like

Nice card and integration, one small thing. Have been through the forum and searched, however not able to find it.

The question is how to remove all information below the line, in the “pre-game card”

The card look like this, before the game.

I can remove some of the information, using the below card-mod, however can not get rid of all information, and remove the dividing line.

I use this config, which removes some parts, however not all of it…

type: custom:teamtracker-card
entity: sensor.team_tracker_bar
card_mod:
  style: |
    .odds {
        display: none;
    }
    .venue {
        display: none;
    }
    .location {
        display: none;
    }
    .overunder {
        display: none;
    }
    ha-card {
        font-size: .8em; 
        line-height: .8em;
    }
home_side: left
show_timeouts: false
show_rank: false
outline: false

Any good examples or ideas.

The following will do what you want on the PRE card, however it will also have impacts on the IN and POST cards. I’ll have to make changes in an upcoming release to allow you to isolate the changes to the PRE card only. Lmk if you would like me to and I will.

In the meantime, you can get around it by using a conditional card and using the card-mod for the PRE state and not using it for any others, but that is admittedly clunky.

card_mod:
  style: |
    .bottom-clickable {
        display: none;
    }
      .line {
        display: none;
    }
1 Like

Works perfectly. thanks.

No need to complicate the card, Im already using a conditional card, to “only show when within 3 days of gamestart”. Will expand my conditions, and show a “not changed” card on gameday. :slight_smile:

Is 2025 World Junior Hockey available? IIHF.com
Need config for Canada?

Doesn’t look like it. It’s not listed as a supported league in hockey and iihf doesn’t work.

https://gist.github.com/nntrn/ee26cb2a0716de0947a0a4e9a157bc1c/b99b9e0d2df72470fa622e2f76cecb0362111e9a#file-extending-espn-api-md

1 Like

Awesome work!

I’ve been trying to strip out a lot of the content and basically show the logos and scores /w card-mod. I can strip out some of the content, but not all:

type: custom:teamtracker-card
entity: sensor.nfl_gb
card_mod:
  style: |
    .line {
     display: none;
     }
    .tv_network {
     display: none;
     }
    .odds {
     display: none;
     }
    .venue {
     display: none;
     }
    .location {
     display: none;
     }
    .team_win_probability {
     display: none;
     }
    .opponent_win_probability {
     display: none;
     }
    .last_play {
     display: none;
     } 
    .down_distance_text {
     display: none;
     }
    .team_record {
     display: none;
     }
    .opponent_record {
     display: none;
     }
show_rank: false
show_timeouts: false

image

any thoughts?

Please put your pasted code between two sets of triple back ticks so it formats correctly.

The easiest way is to use the Preformatted Text in the settings icon in the editor.
image

Thanks, I fixed the post above.

Great. It will help get you some help. I don’t know much about card mod. But others will be able to jump in now that it is readable.

Put your type and entity line in there too. Lol

The styles.js file lists all of the items you can tweak with card-mod.

I would start with bottom-clickable which should get you mostly there. Then go after any others. If you can’t get to something specific, lmk.

1 Like