There is only three games today! This is “Starting Goalies for Today”!!! WHen the site updates data sometime late tonight after the current games are over, it will have tomorrows games (which is nearly everyone).
And to note, you have six goalies listed there. Three games = Three home + Three away. It is listed head to head (Home goalie versus Away goalie).
I did add also a “PICK” that is based on only GAA now. I am looking for a good mathematical representation using GAA and SVP to denote whom should be the preferred goalie at the matchup.
Either rename the starting goalies sensor or add an exclude to not use it in the sensor. It by wildcard is including all nhl sensors and because it was named nhl_starting_goalies that is breaking the team stats
Yes well it is a work in progress. Sometimes the website returns “0” wins, sometimes it returns null. So this fixes Wins, Losses, Shut Outs and OTL for home and away. I do not believe any others can break things.
This also has the simple code that draws the arrow based solely for now on GAA. Keep in mind that its not perfect. Like a goalie who hasn’t played a single game would have “0” and one that played will be larger. It is only an indicator.
type: custom:flex-table-card
title: Starting Goalies
css:
table+: 'padding: 0px; width: 1600px;'
tbody tr:hover: >-
background-color: green!important;
color:white!important;
tbody tr td:nth-child(10): 'background-color: green; color: white;'
card_mod:
style: |
ha-card {
overflow: auto;
}
$: |
.card-header {
padding: 12px 0px 8px 4px!important;
font-size: 16px!important;
line-height: 18px!important;
font-weight: bold!important;
}
entities:
include: sensor.nhl_starting_goalies
columns:
- name: HOME
data: data
modify: >-
'<div><img src="' + x.homeTeamLogoSvg + '"
style="height:
20px;vertical-align:middle;"> ' +
x.homeTeamName + '</div>'
- name: GOALIE
data: data
modify: x.homeGoalieName
- name: RANK
data: data
modify: >-
if(x.homeGoaliePositionRank === null
){'N/A'}else{x.homeGoaliePositionRank}
- name: W
data: data
modify: >-
if(x.homeGoalieWins === null
){'N/A'}else{x.homeGoalieWins}
- name: L
data: data
modify: >-
if(x.homeGoalieLosses === null
){'N/A'}else{x.homeGoalieLosses}
- name: OTL
data: data
modify: >-
if(x.homeGoalieOvertimeLosses === null
){'N/A'}else{x.homeGoalieOvertimeLosses}
- name: SO
data: data
modify: >-
if(x.homeGoalieShutouts === null
){'N/A'}else{x.homeGoalieShutouts}
- name: SVP
data: data
modify: Number(x.homeGoalieSavePercentage).toFixed(3)
- name: GAA
data: data
modify: Number(x.homeGoalieGoalsAgainstAvg).toFixed(2)
- name: PICK
data: data
modify: |-
switch(true){
case (x.homeGoalieGoalsAgainstAvg == 0) || (x.awayGoalieGoalsAgainstAvg == 0) :
'<div style="text-align:center;"><ha-icon icon="mdi:crosshairs-question"></div>';
break;
case (x.homeGoalieGoalsAgainstAvg - x.awayGoalieGoalsAgainstAvg) > 0:
'<div style="text-align:center;"><ha-icon icon="mdi:arrow-right"></div>';
break;
case (x.homeGoalieGoalsAgainstAvg - x.awayGoalieGoalsAgainstAvg) < 0:
'<div style="text-align:center;"><ha-icon icon="mdi:arrow-left"></div>';
break;
default:
'<div style="text-align:center;"><ha-icon icon="mdi:arrow-all"></div>';
}
- name: AWAY
data: data
modify: >-
'<div><img src="' + x.awayTeamLogoSvg + '"
style="height:
20px;vertical-align:middle;"> ' +
x.awayTeamName + '</div>'
- name: GOALIE
data: data
modify: x.awayGoalieName
- name: RANK
data: data
modify: >-
if(x.awayGoaliePositionRank == null
){'N/A'}else{x.awayGoaliePositionRank}
- name: W
data: data
modify: >-
if(x.awayGoalieWins === null
){'N/A'}else{x.awayGoalieWins}
- name: L
data: data
modify: >-
if(x.awayGoalieLosses === null
){'N/A'}else{x.awayGoalieLosses}
- name: OTL
data: data
modify: >-
if(x.awayGoalieOvertimeLosses === null
){'N/A'}else{x.awayGoalieOvertimeLosses}
- name: SO
data: data
modify: >-
if(x.awayGoalieShutouts === null
){'N/A'}else{x.awayGoalieShutouts}
- name: SVP
data: data
modify: Number(x.awayGoalieSavePercentage).toFixed(3)
- name: GAA
data: data
modify: Number(x.awayGoalieGoalsAgainstAvg).toFixed(2)
Not yet. I was working on extracting full NHL hockey fantasy stats for leagues. Or possibly like you wanted … a player tracker that just gives me the stats for players.
I am reviewing Yahoo Sports as their APIs are well documented. I might b able to just get the PLayoff seeding from there (or a scrape). Probably a few weeks before I can get to those tasks.
I should note that the ESPN data does have SEED in it, but it is not correct. It is merely done by conference and does not account for NHL-style (top 3 teams in each Division and then the two best of the remaining in the Conference).
UPDATE: Just you caused me to look, I found out the method to get wildcard team data. So now it is a matter of creating a wildcard sensor and a few other things. I will try to do this later today. This is the link that would deliver just wildcard teams (top two are the current ones, the remainder are currently out of contention). This would need to be combined with top three in each division to give the current picture for Wildcard.