- id: final_score
alias: final_score
initial_state: true
trigger:
platform: state
entity_id: sensor.nhl_hockey
from: "Game Over"
to: "Final"
action:
- service: notify.alexa_media
data:
target:
- "Living room Dot"
message: "Final Score: {{ state_attr( 'sensor.away_team', 'friendly_name') }} {{ states('sensor.away_team') }},, {{ state_attr( 'sensor.home_team', 'friendly_name') }}{{ states('sensor.home_team') }} !"
data:
type: "tts"
This code copied doesnât work for me as I donât have a entity_id: sensor.nhl_hockey
What am I missing??
Do I have to change the entity_id: sensor.nhl_hockey to something like this for every team I follow:
entity_id: sensor.nhl_winnipeg_jets
My config is:
- platform: nhl_api
team_id: 52
name: "NHL Winnipeg Jets"
scan_interval: 1
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 }}"
Scores are announced, my lovelace reports correctly but the âFinal Scoreâ automation does not work.