Skip to content

Commit

Permalink
fix: handle nonexisting player in predefined group editor
Browse files Browse the repository at this point in the history
  • Loading branch information
punxaphil committed Feb 7, 2024
1 parent 845ee5b commit ff960d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/editor/predefined-group-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class PredefinedGroupEditor extends BaseEditor {
{
type: 'integer',
name: 'volume',
label: `${this.hass.states[player].attributes.friendly_name}${volume !== undefined ? `: ${volume}` : ''}`,
label: `${this.hass.states[player]?.attributes.friendly_name ?? ''}${volume !== undefined ? `: ${volume}` : ''}`,
valueMin: 0,
valueMax: 100,
},
Expand Down

0 comments on commit ff960d0

Please sign in to comment.