Makes sense. Thanks for the reply
Hey there… New to HA and Team Tracker… I installed this a few days ago to track my NY sports teams. Added Yankees, Giants, and Knicks, everything working fine in attributes. But then yesterday, Yankees stopped working. Says not found. Used the NYY abbreviation and it was working. Tried deleting and re adding, restarted HA… But still can’t be found. Anyone else have this issue, or any idea how to fix? Thanks in advance!
Looks like it’s working now. Maybe it’s acting weird because it’s postseason.
Can anyone help me make an automation based on the outcome of a game (win or loss). I’ve tried multiple things so far but nothing seems to be working. Any help would be greatly appreciated. I’ve attached one of the things I’ve tried so far. I’ve also tried triggering based on team_winner true or false and that hasn’t worked either. I’ve gotten pretty much everything else I’ve wanted to work so far except for this.
I use this. Add trigger entities as needed:
alias: Notify Game Ends
description: ""
mode: single
triggers:
- entity_id:
- sensor.texas_rangers
to: POST
from: IN
trigger: state
conditions: []
actions:
- variables:
end_term: >-
{% if trigger.to_state.attributes.sport == 'baseball' %} innings {% elif
trigger.to_state.attributes.sport == 'hockey' %} periods {% elif
trigger.to_state.attributes.sport == 'football' %} quarters {% else %}
{% endif %}
- delay:
hours: 0
minutes: 0
seconds: 30
milliseconds: 0
- data:
title: >
{{trigger.to_state.attributes.team_name}} vs
{{trigger.to_state.attributes.opponent_name}}
message: >
{{trigger.to_state.attributes.team_name}} {% if
trigger.to_state.attributes.team_score|int >
trigger.to_state.attributes.opponent_score|int %} win {% elif
trigger.to_state.attributes.team_score|int <
trigger.to_state.attributes.opponent_score|int %} lose {% else %} tie {%
endif %} {{
trigger.to_state.attributes.team_score}}-{{trigger.to_state.attributes.opponent_score}}
in {{trigger.to_state.attributes.quarter}} {{end_term}}.
data:
image: "{{trigger.to_state.attributes.team_logo}}"
action: notify.all_phones
Let us know if you need more.
The delay is because the wife would yell at me if she was notified before we saw it on our streaming service
Salut can you post your code for the card? Do you have enter all teams from the ligue1 manually ?
So, I’ve got a tablet that I’m using as a home dashboard, and one of the things I want to have up on it is a few team tracker cards. The only issue is I want to lock down the tablet so that there’s no internet access (or at least, minimal internet access), but still be able to get team logos on the team tracker card. Of course, ESPN uses akamai so trying to nail down all the IP Addresses you’d need to open up is a can of worms, so limiting it that way is pretty much out of the question.
I could download all the assets for teams whose card I’d like to have up, or I could set up a reverse proxy - but then I’m stil stuck on how to update the cards so that they point to these local assets or the proxy. I think the path of least resistance is to use a helper entity to basically clone a team tracker entity and only update the logo attributes. I’m… Not certain how I could achieve that, though… Any ideas?
How often to team logos change? Just wondering. Not sure I see the issue here. Save them all off, block the tablet at the router, and serve the logos up locally.
Discovered you can create a template sensor and give it attributes, so duplicating it (and using a proxy) would look something like this, obviously use your own sensor and proxy address. Truncated for brevity’s sake, but you would just add all the attributes from the original team tracker sensor.
template:
- sensor:
- name: "Team name"
state: {{ states('sensor.team_tracker' )}}
attributes:
attribution: "{{ state_attr('sensor.team_tracker', 'attribution') }}"
sport: "{{ state_attr('sensor.team_tracker', 'sport') }}"
league: "{{ state_attr('sensor.team_tracker', 'league') }}"
league_logo: "{{ state_attr('sensor.team_tracker', 'league_logo') }} | regex_replace('https://a.espncdn.com', 'http://proxy')"
action: notify.all_phones does not work for me. Do I need to set this up separately?
Yes. You need to create a notify group.
Many threads on it. Here is one of them.
Sending notifications to a group - Feature Requests - Home Assistant Community
Might have been written down here before, but I didn’t come up with a solution…
How do I make my game cards smaller? Not the text sizes but rather the spaces between the lines.
Is there a better way of handling a scenario when there are no upcoming games for a team? Currently, instead of the normal football team logo and name etc, when the api returns no upcoming games, the card shows like this:
So it shows the League logo, and the team ID. Not sure if it would be possible to continue to show the team logo like normal, and the team name as well, or is this not possible due to the lack of any information coming back in the api during these breaks? For reference, I am using the integration type custom, with the sport path as soccer, the league path as eng.3, and the team ID 324. It was showing this way for a few days, due to an FA Cup game and no league games for a short spell, but has today reverted back to displaying correctly with the next upcoming league game:
No team name or logo is returned by the API in the first scenario so the league logo is the only thing available.
The Wiki shows how to use a Conditional card or an Auto Entities card to hide the NOT_FOUND card if you would prefer to display nothing.
Thank you - I should have paid more attention to the wiki
I need to see the card only when the match is live.
This is the code I have
type: conditional
conditions:
- condition: template
value_template: "{{ state_attr('sensor.sri_lanka', 'clock') == 'Live' }}"
card:
type: custom:teamtracker-card
entity: sensor.sri_lanka
But I get an error like this
Please help
Just display it when the sensor state is IN