Sports Standings and Scores

And I have a next wish.

Under the standings it would be good to add the GLOSSARY

OK, I can add the logos easily. I tend not to do so because I live on 42 acres in the mountains and my only internet is DSL. I have many other such things where I download all of them and make it available in the local (in house) network through HA. This would be a better solution in my opinion for logos too because itā€™s not like the team logos change every day/week/year. Good comment and I will add grabbing them dynamically for now and offer some way of using local ones.

1 Like

with the local possibility would of course also be ok

I have a nother idea.

Is it possible to add another section, in which only the last result or if there is a live game then this of x favorite teams

OK, remote will be done in a minute. NHL it looks like this:

Pushed to GITHUB. New version has team logos for all sports

1 Like

Please define, do you mean what the headings mean? As is ā€œGPā€ means ā€œGames Playedā€?

yes that I mean

WHat I would love to add is some ā€œsemiā€ generic way to be able to tune immediately to the channel:

I am pretty sure I can do this with my DirecTV but I need to seperate this from you all or make it generic.

I donā€™t really understand what you want to do here?

I have a nother idea.
Is it possible to add another section, in which only the last result or if there is a live game then this of x favorite teams

Is there a possibility to implement this?

Without a picture it is a bit hard to understand, but this is what I think you mean.

  1. The ability to create a list of favorite teams for a sport
  2. A view in the GUI maybe like this, three columns in wide view:
NHL
Favorites
PRE            IN             POST
Fav1 PRE       Fav1 IN        Fav 1 POST
Fav2 PRE       Fav2 IN        Fav 2 POST
...

You would (I guess) never have PRE and IN, you you could have two of the three.

I could do that but one would need to keep Favorities in some separate file. A better way would be to bring it up in the Teamtracker discussions (I can do that for you if you like). I would say it should be an attribute hanging off a team in Teamtracker like ā€œfavoriteā€. Like this with the Lions in NFL being a ā€œfavoriteā€

##
##  NFL Teams
##
- platform: teamtracker
  league_id: NFL
  team_id: DET
  name: Detroit Lions
  favorite: true
- platform: teamtracker
  league_id: NFL
  team_id: GB
  name: Green Bay
- platform: teamtracker
  league_id: NFL
  team_id: CHI
  name: Chicago Bears

Otherwise, one would need to create a sensor in YAML that stored your favorites.
I can go that route if Teamtracker does not think it a great idea.

Click on a game (or a button below the game) which would turn on my television and jump to that exact game.

Yes you are neerly right.

Now I have make a picture (sorry for the bad live Button I donĀ“t have on at the moment so I paint it)

In one image Iā€™d like to show the box of all the favorites whether the game is in the future, past or live.

But I still donā€™t quite understand how setting a favorite via the Teamtracker integration should work. with your code I create the sensors for each team in the NHL and no longer with the teamtracker integration, right?

I hope now it es a bit clearer.

Ok I understand now. I couldnā€™t use something like that because Iā€™m from Germany. But I can well imagine you in America :blush:

You could do that with something this simple:

type: custom:auto-entities
unique: true
show_empty: false
card:
  type: custom:layout-card
  layout_type: masonry
card_param: cards
entities:
filter:
  include: 
  - entity_id: sensor.detroit_red_wings
    options:
      type: custom:teamtracker-card
  - entity_id: sensor.detroit_pistons
    options:
      type: custom:teamtracker-card
  - entity_id: sensor.detroit_tigers
    options:
      type: custom:teamtracker-card

Of course you use your favorite teams. Now this is not perfect because if two of your favorities are playing eachother, you may wish to get only the home teams.

I think thats ok. You are right, its not perfekt, because (you can see in the screenshot) I have two times the Game Kranken and Sharks (because Kraken and Sharks are two of my favorites.

I have now created a new Games sub-category and then the new Favorites category and the already existing Postgame, Live and Pregame

Iā€™ve combined it with your code now and it looks like this:

Here my Code (only for NHL)

type: custom:mod-card
card_mod:
  style:
    tabbed-card $: |
      mwc-tab {
        background: var(--ha-card-background, var(--card-background-color, white) );
        border-color: var(--ha-card-border-color, var(--divider-color, #e0e0e0) );
        border-width: 2px;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
        border-style: solid;
        overflow: hidden;
        width: 25%;
      }
      mwc-tab[active] {
        background: #EBFFD8 !important;
      }
card:
  type: custom:tabbed-card
  styles:
    '--mdc-theme-primary': green
    '--mdc-tab-text-label-color-default': silver
    '--mdc-typography-button-font-size': 12px
  tabs:
    - attributes:
        label: NHL
        icon: mdi:hockey-puck
      card:
        type: custom:mod-card
        card_mod:
          style:
            tabbed-card $: |
              mwc-tab {
                background: var(--ha-card-background, var(--card-background-color, white) );
                border-color: var(--ha-card-border-color, var(--divider-color, #e0e0e0) );
                border-width: 2px;
                border-top-left-radius: 20px;
                border-top-right-radius: 20px;
                border-style: solid;
                overflow: hidden;
                width: 25%;
              }
              mwc-tab[active] {
                background: #EBFFD8 !important;
              }
        card:
          type: custom:tabbed-card
          styles:
            '--mdc-theme-primary': green
            '--mdc-tab-text-label-color-default': silver
            '--mdc-typography-button-font-size': 12px
          tabs:
            - attributes:
                label: Standings
                icon: mdi:ballot
              card:
                type: custom:mod-card
                card_mod:
                  style:
                    tabbed-card $: |
                      mwc-tab {
                        background: var(--ha-card-background, var(--card-background-color, white) );
                        border-color: var(--ha-card-border-color, var(--divider-color, #e0e0e0) );
                        border-width: 2px;
                        border-top-left-radius: 20px;
                        border-top-right-radius: 20px;
                        border-style: solid;
                        overflow: hidden;
                        width: 25%;
                      }
                      mwc-tab[active] {
                        background: #EBFFD8 !important;
                      }
                card:
                  type: custom:tabbed-card
                  styles:
                    '--mdc-theme-primary': green
                    '--mdc-tab-text-label-color-default': silver
                    '--mdc-typography-button-font-size': 12px
                  tabs:
                    - attributes:
                        label: Divisional
                      card:
                        type: custom:stack-in-card
                        mode: vertical
                        cards:
                          - type: custom:decluttering-card
                            template: nhl_settings
                            variables:
                              - title: Eastern Atlantic
                              - entity: sensor.nhl_east_atlantic
                              - sort: >-
                                  x.stats.find(y=>y.shortDisplayName ==
                                  'PTS').value
                          - type: custom:decluttering-card
                            template: nhl_settings
                            variables:
                              - title: Eastern Metropolitan
                              - entity: sensor.nhl_east_metropolitan
                              - sort: >-
                                  x.stats.find(y=>y.shortDisplayName ==
                                  'PTS').value
                          - type: custom:decluttering-card
                            template: nhl_settings
                            variables:
                              - title: West Central
                              - entity: sensor.nhl_west_central
                              - sort: >-
                                  x.stats.find(y=>y.shortDisplayName ==
                                  'PTS').value
                          - type: custom:decluttering-card
                            template: nhl_settings
                            variables:
                              - title: West Pacific
                              - entity: sensor.nhl_west_pacific
                              - sort: >-
                                  x.stats.find(y=>y.shortDisplayName ==
                                  'PTS').value
                    - attributes:
                        label: Conference
                      card:
                        type: custom:stack-in-card
                        mode: vertical
                        cards:
                          - type: custom:decluttering-card
                            template: nhl_settings
                            variables:
                              - title: Eastern
                              - entity: sensor.nhl_east_*
                              - sort: >-
                                  x.stats.find(y=>y.shortDisplayName ==
                                  'PTS').value
                          - type: custom:decluttering-card
                            template: nhl_settings
                            variables:
                              - title: Western
                              - entity: sensor.nhl_west_*
                              - sort: >-
                                  x.stats.find(y=>y.shortDisplayName ==
                                  'PTS').value
                    - attributes:
                        label: Overall
                      card:
                        type: custom:decluttering-card
                        template: nhl_settings
                        variables:
                          - title: Overall
                          - entity: sensor.nhl_*_*
                          - sort: x.stats.find(y=>y.shortDisplayName == 'PTS').value
                    - attributes:
                        label: Playoffs
                      card:
                        type: custom:stack-in-card
                        mode: vertical
                        cards:
                          - type: custom:decluttering-card
                            template: nhl_settings
                            variables:
                              - title: Eastern
                              - entity: sensor.nhl_east_*
                              - sort: x.stats[5].value * -1
                          - type: custom:decluttering-card
                            template: nhl_settings
                            variables:
                              - title: Western
                              - entity: sensor.nhl_west_*
                              - sort: x.stats[5].value * -1
            - attributes:
                label: Games
                icon: mdi:hockey-sticks
              card:
                type: custom:mod-card
                card_mod:
                  style:
                    tabbed-card $: |
                      mwc-tab {
                        background: var(--ha-card-background, var(--card-background-color, white) );
                        border-color: var(--ha-card-border-color, var(--divider-color, #e0e0e0) );
                        border-width: 2px;
                        border-top-left-radius: 20px;
                        border-top-right-radius: 20px;
                        border-style: solid;
                        overflow: hidden;
                        width: 25%;
                      }
                      mwc-tab[active] {
                        background: #EBFFD8 !important;
                      }
                card:
                  type: custom:tabbed-card
                  styles:
                    '--mdc-theme-primary': green
                    '--mdc-tab-text-label-color-default': silver
                    '--mdc-typography-button-font-size': 12px
                  tabs:
                    - attributes:
                        label: Favoriten
                        icon: mdi:star
                      card:
                        type: custom:auto-entities
                        unique: true
                        show_empty: false
                        card:
                          type: custom:layout-card
                          layout_type: masonry
                        card_param: cards
                        entities: null
                        filter:
                          include:
                            - entity_id: sensor.detroit_red_wings
                              options:
                                type: custom:teamtracker-card
                            - entity_id: sensor.ottawa_senators
                              options:
                                type: custom:teamtracker-card
                            - entity_id: sensor.edmonton_oilers
                              options:
                                type: custom:teamtracker-card
                            - entity_id: sensor.seattle_kraken
                              options:
                                type: custom:teamtracker-card
                            - entity_id: sensor.san_jose_sharks
                              options:
                                type: custom:teamtracker-card
                            - entity_id: sensor.new_york_rangers
                              options:
                                type: custom:teamtracker-card
                            - entity_id: sensor.los_vegas_golden_knights
                              options:
                                type: custom:teamtracker-card
                    - attributes:
                        label: POSTGAME
                        icon: mdi:hockey-sticks
                      card:
                        type: custom:decluttering-card
                        template: game_stats
                        variables:
                          - sport: NHL
                          - status: POST
                    - attributes:
                        label: Live
                        icon: mdi:hockey-puck
                      card:
                        type: custom:decluttering-card
                        template: game_stats
                        variables:
                          - sport: NHL
                          - status: IN
                    - attributes:
                        label: PREGAME
                        icon: mdi:blood-bag
                      card:
                        type: custom:decluttering-card
                        template: game_stats
                        variables:
                          - sport: NHL
                          - status: PRE

1 Like

I already posted to the Teamtracker people, it they only added an attribute ā€œfavoriteā€ then you could do it perfectly.

I am not going to delve deeper in that unless they say ā€œnoā€. If they do then I can rewrite a ā€œfavoritesā€ version.

Ok, then letā€™s just wait for the response from the Teamtracker Developer and see what happens next

Itā€™s really just a little thing, but maybe it would be better for PREGAME to use the mdi.map-clock-outline icon better

image