mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-21 08:16:36 +00:00
Fix blueprint script editor erroneously setting mode
field (#16934)
This commit is contained in:
parent
a96d3594ba
commit
5381a467e5
@ -160,14 +160,16 @@ export class HaScriptEditor extends KeyboardShortcutMixin(LitElement) {
|
|||||||
return nothing;
|
return nothing;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const useBlueprint = "use_blueprint" in this._config;
|
||||||
|
|
||||||
const schema = this._schema(
|
const schema = this._schema(
|
||||||
!!this.scriptId,
|
!!this.scriptId,
|
||||||
"use_blueprint" in this._config,
|
useBlueprint,
|
||||||
this._config.mode
|
this._config.mode
|
||||||
);
|
);
|
||||||
|
|
||||||
const data = {
|
const data = {
|
||||||
mode: MODES[0],
|
...(!this._config.mode && !useBlueprint && { mode: MODES[0] }),
|
||||||
icon: undefined,
|
icon: undefined,
|
||||||
max: this._config.mode && isMaxMode(this._config.mode) ? 10 : undefined,
|
max: this._config.mode && isMaxMode(this._config.mode) ? 10 : undefined,
|
||||||
...this._config,
|
...this._config,
|
||||||
@ -332,7 +334,7 @@ export class HaScriptEditor extends KeyboardShortcutMixin(LitElement) {
|
|||||||
</ha-card>
|
</ha-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
${"use_blueprint" in this._config
|
${useBlueprint
|
||||||
? html`
|
? html`
|
||||||
<blueprint-script-editor
|
<blueprint-script-editor
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user