diff --git a/src/editor/predefined-group-editor.ts b/src/editor/predefined-group-editor.ts index 57fa0691..b6cf68ab 100644 --- a/src/editor/predefined-group-editor.ts +++ b/src/editor/predefined-group-editor.ts @@ -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, },