diff --git a/src/panels/config/automation/blueprint-automation-editor.ts b/src/panels/config/automation/blueprint-automation-editor.ts index 74d3d0586e..a860e29481 100644 --- a/src/panels/config/automation/blueprint-automation-editor.ts +++ b/src/panels/config/automation/blueprint-automation-editor.ts @@ -9,7 +9,6 @@ import "../../../components/ha-circular-progress"; import "../../../components/ha-markdown"; import "../../../components/ha-selector/ha-selector"; import "../../../components/ha-settings-row"; -import "../../../components/ha-textfield"; import "../../../components/ha-alert"; import { BlueprintAutomationConfig } from "../../../data/automation"; import { @@ -129,27 +128,19 @@ export class HaBlueprintAutomationEditor extends LitElement { breaks .content=${value?.description} > - ${value?.selector - ? html`` - : html``} + ${html``} ` ) : html`

@@ -173,7 +164,7 @@ export class HaBlueprintAutomationEditor extends LitElement { } fireEvent(this, "value-changed", { value: { - ...this.config!, + ...this.config, use_blueprint: { path: ev.detail.value, }, @@ -195,20 +186,9 @@ export class HaBlueprintAutomationEditor extends LitElement { } const input = { ...this.config.use_blueprint.input, [key]: value }; - const blueprint = this._blueprint; - const metaValue = - !blueprint || "error" in blueprint - ? undefined - : blueprint?.metadata.input && blueprint?.metadata?.input[key]; - const keyDefault = metaValue && metaValue.default; - - if ((value === "" && !keyDefault) || value === undefined) { - delete input[key]; - } - fireEvent(this, "value-changed", { value: { - ...this.config!, + ...this.config, use_blueprint: { ...this.config.use_blueprint, input, diff --git a/src/panels/config/script/blueprint-script-editor.ts b/src/panels/config/script/blueprint-script-editor.ts index 7a71170b98..a47b16b727 100644 --- a/src/panels/config/script/blueprint-script-editor.ts +++ b/src/panels/config/script/blueprint-script-editor.ts @@ -5,7 +5,6 @@ import "../../../components/ha-blueprint-picker"; import "../../../components/ha-card"; import "../../../components/ha-circular-progress"; import "../../../components/ha-markdown"; -import "../../../components/ha-textfield"; import "../../../components/ha-selector/ha-selector"; import "../../../components/ha-settings-row"; @@ -108,27 +107,19 @@ export class HaBlueprintScriptEditor extends LitElement { breaks .content=${value?.description} > - ${value?.selector - ? html`` - : html``} + ${html``} ` ) : html`

@@ -174,17 +165,6 @@ export class HaBlueprintScriptEditor extends LitElement { } const input = { ...this.config.use_blueprint.input, [key]: value }; - const blueprint = this._blueprint; - const metaValue = - !blueprint || "error" in blueprint - ? undefined - : blueprint?.metadata.input && blueprint?.metadata?.input[key]; - const keyDefault = metaValue && metaValue.default; - - if ((value === "" && !keyDefault) || value === undefined) { - delete input[key]; - } - fireEvent(this, "value-changed", { value: { ...this.config,