Sports Standings and Scores

I have posted that solution in the past. You use auto-entities and eliminate the away teams.
Example for NFL:

Perfect, it works great.
I am happy.
more than to put all that on a nice correct card.
there too, I still have work to do. I would like to reproduce the kind of page like this:

nhl

With above, the different football leagues (belgium, france, england, etcā€¦)
and in the sub tab, the rankings, the weekend matches, and the results.

Still a lot of work I think. Iā€™m not there yetā€¦

in any case, I really want to thank everyone who contributed to the success of my card, and to understand the whole system a little more. Iā€™m mostly talking about:

@kbrown01
@schmierlappe
@jeffcrum
who really helped me out.

If you still have a little time to waste and concentrate on me, Iā€™m a buyer for the famous card that I still have to do. :grinning: :grinning: :grinning:

Here is the result of my progress.
Itā€™s still not too bad I think, for a beginnerā€¦ :grinning: :grinning: :grinning:

What do you think ?

1 Like

I think it looks excellent! Nice work.

Now this is completed I am going to remove this from my Dev environment. You seem to be well along now. Moving on to complete a huge music system rewrite!

Are you going to re-write the music system?
If so, Iā€™m very interestedā€¦

And thank you again for your helpā€¦

Off topic here but I helped with the Dayton Audio Dax88 integration. I have been working in a few directions but the overall system is very nice. I just added ā€œAlexaā€ support as I have an Alexa hockey puck plugged into my multizone controller as one input. I downloaded a list of 10000 artist names and plugged all that together (culling the list to 1500 for now).

This new thing allow you to select Spotify or Pandora (easily could be extended to Amazon or Apple or whatever integrates to Alexa) and select an artist and it basically sends the command to Alexa.

I have wall mounted pads throughout the house ā€¦ hereā€™s a screen showing picking Marley to play on one zone in my house through Spotify.

not bad at allā€¦
Nice work.
do you already have a link concerning this subject, or a sharing of this music system?
Me on my side, I have a abo on spotify, and I use 8 alexa in all the house and 1 sonos. so yes, your system interests me too.
a link to the forum or to the share?
thanks to you.

Here is a current card

In case anyone here would like it or wants to modify it for their own sports and leagues or favorites, here is an automation that play on Alexa when the score changes in a game. This is mine for NFL (which I think I can template, not sure): It just lists the teamtracker entities for all NFL teams.

alias: Sport Scoring
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.minnesota_vikings
      - sensor.philadelphia_eagles
      - sensor.washington_commanders
      - sensor.new_york_jets
      - sensor.tampa_bay_buccaneers
      - sensor.houston_texans
      - sensor.tennessee_titans
      - sensor.dallas_cowboys
      - sensor.chicago_bears
      - sensor.los_angeles_rams
      - sensor.carolina_panthers
      - sensor.new_york_giants
      - sensor.kansas_city_chiefs
      - sensor.buffalo_bills
      - sensor.denver_broncos
      - sensor.arizona_cardinals
      - sensor.pittsburg_steelers
      - sensor.atlanta_falcons
      - sensor.san_francisco_49ers
      - sensor.cincinnati_bengals
      - sensor.baltimore_ravens
      - sensor.detroit_lions
      - sensor.miami_dolphins
      - sensor.jacksonville_jaguars
      - sensor.cleveland_browns
      - sensor.los_angeles_chargers
      - sensor.new_orleans_saints
      - sensor.green_bay
      - sensor.indianapolis_colts
      - sensor.new_england_patriots
      - sensor.las_vegas_raiders
      - sensor.seattle_seahawks
    attribute: opponent_score
  - platform: state
    entity_id:
      - sensor.minnesota_vikings
      - sensor.philadelphia_eagles
      - sensor.washington_commanders
      - sensor.new_york_jets
      - sensor.tampa_bay_buccaneers
      - sensor.houston_texans
      - sensor.tennessee_titans
      - sensor.dallas_cowboys
      - sensor.chicago_bears
      - sensor.los_angeles_rams
      - sensor.carolina_panthers
      - sensor.new_york_giants
      - sensor.kansas_city_chiefs
      - sensor.buffalo_bills
      - sensor.denver_broncos
      - sensor.arizona_cardinals
      - sensor.pittsburg_steelers
      - sensor.atlanta_falcons
      - sensor.san_francisco_49ers
      - sensor.cincinnati_bengals
      - sensor.baltimore_ravens
      - sensor.detroit_lions
      - sensor.miami_dolphins
      - sensor.jacksonville_jaguars
      - sensor.cleveland_browns
      - sensor.los_angeles_chargers
      - sensor.new_orleans_saints
      - sensor.green_bay
      - sensor.indianapolis_colts
      - sensor.new_england_patriots
      - sensor.las_vegas_raiders
      - sensor.seattle_seahawks
    attribute: team_score
condition:
  - condition: template
    value_template: "{{ state_attr(trigger.entity_id,'team_homeaway') == 'home'}}"
action:
  - service: media_player.play_media
    data:
      media_content_id: air_horn_03
      media_content_type: sound
    target:
      entity_id:
        - media_player.deck_alexa
  - service: notify.alexa_media_deck_alexa
    data:
      message: >
        Score update! {{state_attr(trigger.entity_id, 'team_name')}}
        {{state_attr(trigger.entity_id,'team_score')}}, 
        {{state_attr(trigger.entity_id, 'opponent_name')}} 
        {{state_attr(trigger.entity_id,'opponent_score')}}
mode: parallel

Iā€™m testing that right away. very good idea my friend. :ok_hand:
Thank you for sharing.

Is it just me? NFL standings are not showing up. Looking at the JSON, I am not getting all of the info using https://site.web.api.espn.com/apis/v2/sports/football/nfl/standings?seasontype=2&type=0&level=3

Are they not updating that yet? I find that odd since they are in pre-season now.

Never mind! I see seasontype causes this.

Yes, you would have to set seasontype to the preseaon value should you be interested in preseason standings. YOu could probably get that information from a query and make it more automatic

1 Like

FYI, I changed the last part for NFL fans to this:

service: notify.alexa_media_deck_alexa
data:
  message: >
    Score update in {{state_attr(trigger.entity_id, 'opponent_name')}} versus
    {{state_attr(trigger.entity_id, 'team_name')}}.

    {{state_attr(trigger.entity_id, 'team_name')}}
    {{state_attr(trigger.entity_id,'team_score')}}, 
    {{state_attr(trigger.entity_id, 'opponent_name')}} 
    {{state_attr(trigger.entity_id,'opponent_score')}}.

    Last Play. 

    {{state_attr(trigger.entity_id,'last_play') | replace ('Ex. Pt','Extra
    Point')}}

I got sick of Alexa saying ā€œE X P Tā€ ā€¦ lol

1 Like

I added this one also to my setup, announces gametime with a BANG:

alias: NFL Announce Gametime
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.minnesota_vikings
      - sensor.philadelphia_eagles
      - sensor.washington_commanders
      - sensor.new_york_jets
      - sensor.tampa_bay_buccaneers
      - sensor.houston_texans
      - sensor.tennessee_titans
      - sensor.dallas_cowboys
      - sensor.chicago_bears
      - sensor.los_angeles_rams
      - sensor.carolina_panthers
      - sensor.new_york_giants
      - sensor.kansas_city_chiefs
      - sensor.buffalo_bills
      - sensor.denver_broncos
      - sensor.arizona_cardinals
      - sensor.pittsburg_steelers
      - sensor.atlanta_falcons
      - sensor.san_francisco_49ers
      - sensor.cincinnati_bengals
      - sensor.baltimore_ravens
      - sensor.detroit_lions
      - sensor.miami_dolphins
      - sensor.jacksonville_jaguars
      - sensor.cleveland_browns
      - sensor.los_angeles_chargers
      - sensor.new_orleans_saints
      - sensor.green_bay
      - sensor.indianapolis_colts
      - sensor.new_england_patriots
      - sensor.las_vegas_raiders
      - sensor.seattle_seahawks
    from: PRE
    to: IN
condition:
  - condition: template
    value_template: "{{ state_attr(trigger.entity_id,'team_homeaway') == 'home'}}"
action:
  - service: notify.alexa_media_deck_alexa
    data:
      message: <audio src="soundbank://soundlibrary/guns/cannons/cannons_02"/>
  - service: notify.alexa_media_deck_alexa
    data:
      message: >
        Gametime! {{state_attr(trigger.entity_id, 'opponent_name')}} versus
        {{state_attr(trigger.entity_id, 'team_name')}} 
mode: single

HAHA. Yup. I do not have my automations speaking. But, can certainly understand that annoyance!

Again, thanks for all you have done with this. It is really amazing!!!

What was funny is we are sitting around watching SF pregame and my Alexa just came on and announced a score. Impressive as it happened on TV two plays later!

Spoiler Alert!

1 Like

Right. I actually put in a three second delay to keep my wife from freaking out :slight_smile:

Might need more for two plays. It all depends on your TV provider :slight_smile:

1 Like

Agreed. ESPN was tight to the game but of course blacked out on ESPN as it is SF and I live in that broadcast area. So regular TV ā€¦ CBS I think ā€¦ who the heck cares, we all have to move to YouTubeTV now and I can guarantee that will not be a great experience.

I loved DirecTV games.

I could easily sync every single TV in house, broadcast audio throughout the house, everything solid as a rock. Now that it is streaming I know it will get glitches here, there, everywhere and TVs will get out of sync of audio, etc.

Gonna be a season to experiment with it all.

Using the same concepts as the scoring and such, I just started looking through the data if we can figure out a ā€œRed Zoneā€ app ā€¦ that would be fun. ONly thing I see is parsing apart this:

down_distance_text: 4th & 2 at LV 40

I have to watch all the updates here and see if that would be parsed apart to identify inside the 20 for opposing team

1 Like

So funny. We are YouTubeTV. Truely less than impressed.

Watching it on Roku devices. But, the buffering is getting ridiculous! Roku keeps giving me ā€˜check your internetā€™ messages.

Internet is freaking fine. YouTubeTV is less than fine!!! Just saying!