diff --git a/src/components/ha-selector/ha-selector-target.ts b/src/components/ha-selector/ha-selector-target.ts index e4cf47278d..9853d1552e 100644 --- a/src/components/ha-selector/ha-selector-target.ts +++ b/src/components/ha-selector/ha-selector-target.ts @@ -9,6 +9,7 @@ import { } from "lit"; import { customElement, property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; +import { ensureArray } from "../../common/array/ensure-array"; import { DeviceRegistryEntry, getDeviceIntegrationLookup, @@ -78,7 +79,7 @@ export class HaTargetSelector extends LitElement { ? [this.selector.target?.entity.device_class] : undefined} .includeDomains=${this.selector.target?.entity?.domain - ? [this.selector.target?.entity.domain] + ? ensureArray(this.selector.target.entity.domain as string | string[]) : undefined} .disabled=${this.disabled} >`; diff --git a/src/panels/config/automation/blueprint-automation-editor.ts b/src/panels/config/automation/blueprint-automation-editor.ts index 8eb563bd10..43b0ccf681 100644 --- a/src/panels/config/automation/blueprint-automation-editor.ts +++ b/src/panels/config/automation/blueprint-automation-editor.ts @@ -184,7 +184,7 @@ export class HaBlueprintAutomationEditor extends LitElement { ev.stopPropagation(); const target = ev.target as any; const key = target.key; - const value = ev.detail?.value ?? target.value; + const value = ev.detail ? ev.detail.value : target.value; if ( (this.config.use_blueprint.input && this.config.use_blueprint.input[key] === value) || diff --git a/src/panels/config/script/blueprint-script-editor.ts b/src/panels/config/script/blueprint-script-editor.ts index 3e4f3e8ec8..20746fcdbb 100644 --- a/src/panels/config/script/blueprint-script-editor.ts +++ b/src/panels/config/script/blueprint-script-editor.ts @@ -158,7 +158,7 @@ export class HaBlueprintScriptEditor extends LitElement { ev.stopPropagation(); const target = ev.target as any; const key = target.key; - const value = ev.detail?.value ?? target.value; + const value = ev.detail ? ev.detail.value : target.value; if ( (this.config.use_blueprint.input && this.config.use_blueprint.input[key] === value) ||