From 19e1bd9afdde5f354b40b869b039b2fed884b83f Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Thu, 23 Oct 2025 15:52:47 +0200 Subject: [PATCH] Handle service description might be undefined --- src/components/ha-service-picker.ts | 4 +++- src/panels/config/automation/add-automation-element-dialog.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/ha-service-picker.ts b/src/components/ha-service-picker.ts index 2d9c6c0853..c935da581c 100644 --- a/src/components/ha-service-picker.ts +++ b/src/components/ha-service-picker.ts @@ -162,7 +162,9 @@ class HaServicePicker extends LitElement { const description = this.hass.localize( `component.${domain}.services.${service}.description` - ) || services[domain][service].description; + ) || + services[domain][service].description || + ""; items.push({ id: serviceId, diff --git a/src/panels/config/automation/add-automation-element-dialog.ts b/src/panels/config/automation/add-automation-element-dialog.ts index dc8a9b7112..8a61b5ab17 100644 --- a/src/panels/config/automation/add-automation-element-dialog.ts +++ b/src/panels/config/automation/add-automation-element-dialog.ts @@ -407,7 +407,9 @@ class DialogAddAutomationElement description: this.hass.localize( `component.${dmn}.services.${service}.description` - ) || services[dmn][service]?.description, + ) || + services[dmn][service]?.description || + "", }); } };