diff --git a/src/panels/lovelace/components/hui-action-editor.ts b/src/panels/lovelace/components/hui-action-editor.ts index 3bc6853ed2..91292ccfd1 100644 --- a/src/panels/lovelace/components/hui-action-editor.ts +++ b/src/panels/lovelace/components/hui-action-editor.ts @@ -33,18 +33,18 @@ export class HuiActionEditor extends LitElement { @property() protected hass?: HomeAssistant; get _navigation_path(): string { - const config = this.config as NavigateActionConfig; - return config.navigation_path || ""; + const config = this.config as NavigateActionConfig | undefined; + return config?.navigation_path || ""; } get _url_path(): string { - const config = this.config as UrlActionConfig; - return config.url_path || ""; + const config = this.config as UrlActionConfig | undefined; + return config?.url_path || ""; } get _service(): string { const config = this.config as CallServiceActionConfig; - return config.service || ""; + return config?.service || ""; } private _serviceAction = memoizeOne(