I’m trying to setup a notification for when NHL games start. I’m using an integration that provides the following sensor and data
The entity id is sensor.ducks
national_broadcasts: []
away_broadcasts:
- Victory+
- KCOP-13
home_broadcasts:
- FDSNNO
- FDSNWIX
game_id: 2024021298
live_feed: https://www.nhl.com/gamecenter/ana-vs-min/2025/04/15/2024021298
game_state: LIVE
away_id: 24
home_id: 30
away_name: Anaheim Ducks
home_name: Minnesota Wild
away_logo: https://assets.nhle.com/logos/nhl/svg/ANA_light.svg
home_logo: https://assets.nhle.com/logos/nhl/svg/MIN_light.svg
next_game_time: 5:00 PM
next_game_datetime: "2025-04-15T17:00:00-07:00"
next_game_date: April 15, 2025
goal_tracked_team: false
icon: mdi:hockey-sticks
friendly_name: Ducks
This is the automation that I’m trying to use.
alias: NHL-Testing
description: ""
triggers:
- trigger: state
entity_id:
- sensor.ducks
- sensor.kings
attribute: game_state
to: LIVE
conditions: []
actions:
- action: notify.notify
metadata: {}
data:
message: |
{{ trigger.entity_id }} Game Started
mode: single
This does work, but the entity ID isn’t very aestheticly pleasing. How can I modify the template in the notification message field to use the friendly_name entity attribute? This is tricky because I have multiple triggers, so I would need to account for which trigger was used and then grab that sensor’s attribute and display it.
I would like to be able to add / remove teams without creating separate automations. I would also like to include other entity attributes in the message field as well, so I’m trying to get a handle on this.