Great! My pleasure.
Really digging this integration paired with a grid and mushroom cards! Thanks @jayblackedout for taking the time to put this integration together. Love it.
Edit: Once the game ended this evening, I noticed I could hide the middle row as the time remaining and period no longer mattered. So I created a conditional card, with the same two column grid with a mushroom entity for each. Using the statuses from the documentation I have it to only display the time and period grid when the game is in either āIn Progressā or āIn Progress - Criticalā.
Looks great! Happy youāre enjoying it.
Everytime I add the systemmonitor code AFTER the NHL code I lose the NHL sensors???
sensor:
- platform: nhl_api
team_id: 8
name: "NHL Montreal Canadiens"
scan_interval: 5
- platform: nhl_api
team_id: 10
name: "NHL Maple Leafs"
scan_interval: 5
- platform: nhl_api
team_id: 23
name: "NHL Vancouver Canucks"
scan_interval: 5
- platform: nhl_api
team_id: 52
name: "NHL Winnipeg Jets"
scan_interval: 5
- platform: nhl_api
team_id: 20
name: "NHL Calgary Flames"
scan_interval: 5
- platform: nhl_api
team_id: 22
name: "NHL Edmonton Oilers"
scan_interval: 5
- platform: template
sensors:
nhl_edmonton_oilers_away_team:
entity_picture_template: "{{ states.sensor.nhl_edmonton_oilers.attributes.away_logo }}"
friendly_name_template: "{{ states.sensor.nhl_edmonton_oilers.attributes.away_name }}"
value_template: "{{ states.sensor.nhl_edmonton_oilers.attributes.away_score }}"
nhl_edmonton_oilers_home_team:
entity_picture_template: "{{ states.sensor.nhl_edmonton_oilers.attributes.home_logo }}"
friendly_name_template: "{{ states.sensor.nhl_edmonton_oilers.attributes.home_name }}"
value_template: "{{ states.sensor.nhl_edmonton_oilers.attributes.home_score }}"
- platform: template
sensors:
nhl_maple_leafs_away_team:
entity_picture_template: "{{ states.sensor.nhl_maple_leafs.attributes.away_logo }}"
friendly_name_template: "{{ states.sensor.nhl_maple_leafs.attributes.away_name }}"
value_template: "{{ states.sensor.nhl_maple_leafs.attributes.away_score }}"
nhl_maple_leafs_home_team:
entity_picture_template: "{{ states.sensor.nhl_maple_leafs.attributes.home_logo }}"
friendly_name_template: "{{ states.sensor.nhl_maple_leafs.attributes.home_name }}"
value_template: "{{ states.sensor.nhl_maple_leafs.attributes.home_score }}"
- platform: template
sensors:
nhl_calgary_flames_away_team:
entity_picture_template: "{{ states.sensor.nhl_calgary_flames.attributes.away_logo }}"
friendly_name_template: "{{ states.sensor.nhl_calgary_flames.attributes.away_name }}"
value_template: "{{ states.sensor.nhl_calgary_flames.attributes.away_score }}"
nhl_calgary_flames_home_team:
entity_picture_template: "{{ states.sensor.nhl_calgary_flames.attributes.home_logo }}"
friendly_name_template: "{{ states.sensor.nhl_calgary_flames.attributes.home_name }}"
value_template: "{{ states.sensor.nhl_calgary_flames.attributes.home_score }}"
nhl_montreal_canadiens_away_team:
entity_picture_template: "{{ states.sensor.nhl_montreal_canadiens.attributes.away_logo }}"
friendly_name_template: "{{ states.sensor.nhl_montreal_canadiens.attributes.away_name }}"
value_template: "{{ states.sensor.nhl_montreal_canadiens.attributes.away_score }}"
nhl_montreal_canadiens_home_team:
entity_picture_template: "{{ states.sensor.nhl_montreal_canadiens.attributes.home_logo }}"
friendly_name_template: "{{ states.sensor.nhl_montreal_canadiens.attributes.home_name }}"
value_template: "{{ states.sensor.nhl_montreal_canadiens.attributes.home_score }}"
nhl_vancouver_canucks_away_team:
entity_picture_template: "{{ states.sensor.nhl_vancouver_canucks.attributes.away_logo }}"
friendly_name_template: "{{ states.sensor.nhl_vancouver_canucks.attributes.away_name }}"
value_template: "{{ states.sensor.nhl_vancouver_canucks.attributes.away_score }}"
nhl_vancouver_canucks_home_team:
entity_picture_template: "{{ states.sensor.nhl_vancouver_canucks.attributes.home_logo }}"
friendly_name_template: "{{ states.sensor.nhl_vancouver_canucks.attributes.home_name }}"
value_template: "{{ states.sensor.nhl_vancouver_canucks.attributes.home_score }}"
nhl_winnipeg_jets_away_team:
entity_picture_template: "{{ states.sensor.nhl_winnipeg_jets.attributes.away_logo }}"
friendly_name_template: "{{ states.sensor.nhl_winnipeg_jets.attributes.away_name }}"
value_template: "{{ states.sensor.nhl_winnipeg_jets.attributes.away_score }}"
nhl_winnipeg_jets_home_team:
entity_picture_template: "{{ states.sensor.nhl_winnipeg_jets.attributes.home_logo }}"
friendly_name_template: "{{ states.sensor.nhl_winnipeg_jets.attributes.home_name }}"
value_template: "{{ states.sensor.nhl_winnipeg_jets.attributes.home_score }}"
input_number:
away_score:
min: 0
max: 100
home_score:
min: 0
max: 100
Everytime I add the following below AFTER the nhl code I lose the NHL lovelace!
###SYSTEM#
sensor:
- platform: systemmonitor
resources:
- type: disk_use_percent
arg: /config
- type: disk_use
- type: disk_free
- type: memory_use_percent
- type: memory_use
- type: memory_free
- type: swap_use_percent
- type: swap_use
- type: swap_free
- type: load_1m
- type: load_5m
- type: load_15m
- type: network_in
arg: eth0
- type: network_out
arg: eth0
- type: throughput_network_in
arg: eth0
- type: throughput_network_out
arg: eth0
- type: packets_in
arg: eth0
- type: packets_out
arg: eth0
- type: ipv4_address
arg: eth0
- type: ipv6_address
arg: eth0
- type: processor_use
- type: processor_temperature
- type: last_boot
I lose my Teams and it shows as not avaialble?
Why is that?
Remove the second sensor:
from your YAML and donāt modify the indentation of the rest.
sensor:
- platform: nhl_api
team_id: 8
name: "NHL Montreal Canadiens"
scan_interval: 5
- platform: nhl_api
team_id: 10
name: "NHL Maple Leafs"
scan_interval: 5
- platform: nhl_api
team_id: 23
name: "NHL Vancouver Canucks"
scan_interval: 5
- platform: nhl_api
team_id: 52
name: "NHL Winnipeg Jets"
scan_interval: 5
- platform: nhl_api
team_id: 20
name: "NHL Calgary Flames"
scan_interval: 5
- platform: nhl_api
team_id: 22
name: "NHL Edmonton Oilers"
scan_interval: 5
- platform: template
nhl_edmonton_oilers_away_team:
entity_picture_template: "{{ states.sensor.nhl_edmonton_oilers.attributes.away_logo }}"
friendly_name_template: "{{ states.sensor.nhl_edmonton_oilers.attributes.away_name }}"
value_template: "{{ states.sensor.nhl_edmonton_oilers.attributes.away_score }}"
nhl_edmonton_oilers_home_team:
entity_picture_template: "{{ states.sensor.nhl_edmonton_oilers.attributes.home_logo }}"
friendly_name_template: "{{ states.sensor.nhl_edmonton_oilers.attributes.home_name }}"
value_template: "{{ states.sensor.nhl_edmonton_oilers.attributes.home_score }}"
- platform: template
nhl_maple_leafs_away_team:
entity_picture_template: "{{ states.sensor.nhl_maple_leafs.attributes.away_logo }}"
friendly_name_template: "{{ states.sensor.nhl_maple_leafs.attributes.away_name }}"
value_template: "{{ states.sensor.nhl_maple_leafs.attributes.away_score }}"
nhl_maple_leafs_home_team:
entity_picture_template: "{{ states.sensor.nhl_maple_leafs.attributes.home_logo }}"
friendly_name_template: "{{ states.sensor.nhl_maple_leafs.attributes.home_name }}"
value_template: "{{ states.sensor.nhl_maple_leafs.attributes.home_score }}"
- platform: template
nhl_calgary_flames_away_team:
entity_picture_template: "{{ states.sensor.nhl_calgary_flames.attributes.away_logo }}"
friendly_name_template: "{{ states.sensor.nhl_calgary_flames.attributes.away_name }}"
value_template: "{{ states.sensor.nhl_calgary_flames.attributes.away_score }}"
nhl_calgary_flames_home_team:
entity_picture_template: "{{ states.sensor.nhl_calgary_flames.attributes.home_logo }}"
friendly_name_template: "{{ states.sensor.nhl_calgary_flames.attributes.home_name }}"
value_template: "{{ states.sensor.nhl_calgary_flames.attributes.home_score }}"
- platform: template
nhl_montreal_canadiens_away_team:
entity_picture_template: "{{ states.sensor.nhl_montreal_canadiens.attributes.away_logo }}"
friendly_name_template: "{{ states.sensor.nhl_montreal_canadiens.attributes.away_name }}"
value_template: "{{ states.sensor.nhl_montreal_canadiens.attributes.away_score }}"
nhl_montreal_canadiens_home_team:
entity_picture_template: "{{ states.sensor.nhl_montreal_canadiens.attributes.home_logo }}"
friendly_name_template: "{{ states.sensor.nhl_montreal_canadiens.attributes.home_name }}"
value_template: "{{ states.sensor.nhl_montreal_canadiens.attributes.home_score }}"
- platform: template
nhl_vancouver_canucks_away_team:
entity_picture_template: "{{ states.sensor.nhl_vancouver_canucks.attributes.away_logo }}"
friendly_name_template: "{{ states.sensor.nhl_vancouver_canucks.attributes.away_name }}"
value_template: "{{ states.sensor.nhl_vancouver_canucks.attributes.away_score }}"
nhl_vancouver_canucks_home_team:
entity_picture_template: "{{ states.sensor.nhl_vancouver_canucks.attributes.home_logo }}"
friendly_name_template: "{{ states.sensor.nhl_vancouver_canucks.attributes.home_name }}"
value_template: "{{ states.sensor.nhl_vancouver_canucks.attributes.home_score }}"
- platform: template
nhl_winnipeg_jets_away_team:
entity_picture_template: "{{ states.sensor.nhl_winnipeg_jets.attributes.away_logo }}"
friendly_name_template: "{{ states.sensor.nhl_winnipeg_jets.attributes.away_name }}"
value_template: "{{ states.sensor.nhl_winnipeg_jets.attributes.away_score }}"
nhl_winnipeg_jets_home_team:
entity_picture_template: "{{ states.sensor.nhl_winnipeg_jets.attributes.home_logo }}"
friendly_name_template: "{{ states.sensor.nhl_winnipeg_jets.attributes.home_name }}"
value_template: "{{ states.sensor.nhl_winnipeg_jets.attributes.home_score }}"
input_number:
away_score:
min: 0
max: 100
home_score:
min: 0
max: 100
The above doesnt seem to work
NVMD: I moved all sensors into its own file and it all works. Thanks.
Hi! Iām completely new to HA, HACS, and this NHL API integration. Iāve gotten HA setup, HACS installed, downloaded your integration (THANK YOU), and Iām now in the process of configuring. I add the below code to the configuration.yaml file:
sensor:
- platform: nhl_api
team_id: 3
But keep getting this error when trying to validate the yaml:
Configuration invalid!
Platform error sensor.nhl_api - Integration ānhl_apiā not found.
Iām sure itās a stupid simple step Iām missing, but I definitely appreciate any guidance! Once I get things up and running, the goal will be to have light blink every time my team scores. Thanks!
Did you reboot after installing this component from HACS? HA doesnāt know the platform exists which was installed from HACS until a reboot.
well thatās embarrassing. instead of rebooting through the settings, i was trying to reboot from the yaml config checker - and it wouldnāt let me since there was a āconfig errorā being thrown. looks like itās working now. onto frontend and automations!
iāve edited my configuration.yaml and iām able to see the basic NHL card on my dashboard. the next step seems to be to edit the ui-lovelace.yaml file. i donāt see that in any directories so iām assuming iām supposed to create the file manually? can you please point me in the right direction? iām having trouble finding documentation to do this step correctly. thanks in advance!
Click the 3 stacked dots at the top-right of your dashboard and select āEdit Dashboardā. Then click āAdd Cardā in the bottom right. Scroll down to the very bottom and select manual. This will allow you to paste in the YAML examples I shared in the repository.
You can also play around with other cards to display the sensor information as you see fit. Enjoy!
thanks @jayblackedout! i feel like iām getting closer here, but iām getting the below issue when using the sample config:
You need to create the template sensors. Read the full frontline examples page.
is this the page youāre referring to? hass-nhlapi/frontend.md at a8b322e3758e4bc59431022c1c25186baee7dcc8 Ā· JayBlackedOut/hass-nhlapi Ā· GitHub
if so, iāve read through it 20 times and canāt figure out what iām doing wrong . iāve updated the configuration.yaml and can see that the sensor data is being passed through. i just canāt get it to display the scoreboard in the card. iām sure iām missing something, but itās not glaring to me.
Please post your full configuration as a code block and Iāll have a look.
thanks and sorry in advance. i wasnāt able to copy the config yaml in the browser iām using for some reason, so hereās a screenshot:
configuration.yaml
lovelace/card config:
- hours_to_show: 24
graph: line
type: sensor
entity: sensor.nhl_new_york_rangers
detail: 1
name: NHL - NYR
- type: entities
show_header_toggle: false
entities:
- entity: sensor.nhl_new_york_rangers
- entity: sensor.away_team
- entity: sensor.home_team
You have plate
in your config rather than template
which would explain why your template sensors arenāt rendering. Once thatās fixed, double check the entity IDs of the new sensors and make sure you have them listed correctly in your Lovelace configuration.
Hi! This component looks grate! Too bad Iām in Sweden! Is it possible to do something similar for SHL ?
Sens you have a reddy component ?
http://doc.openapi.shl.se
Looks like the SHL API is well documented. I donāt have the time or appetite to take that on right now but someone could easily do so. They can even re-use some of my code as the endpoints look similar.