mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 10:16:46 +00:00
dont remove id from automation config (#13609)
This commit is contained in:
parent
91fa5972d1
commit
07bc9081b8
@ -498,13 +498,11 @@ export class HaAutomationEditor extends KeyboardShortcutMixin(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private _preprocessYaml() {
|
private _preprocessYaml() {
|
||||||
const cleanConfig = this._config;
|
if (!this._config) {
|
||||||
if (!cleanConfig) {
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
const cleanConfig: AutomationConfig = { ...this._config };
|
||||||
delete cleanConfig.id;
|
delete cleanConfig.id;
|
||||||
|
|
||||||
return cleanConfig;
|
return cleanConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -522,7 +520,7 @@ export class HaAutomationEditor extends KeyboardShortcutMixin(LitElement) {
|
|||||||
if (!ev.detail.isValid) {
|
if (!ev.detail.isValid) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this._config = ev.detail.value;
|
this._config = { id: this._config?.id, ...ev.detail.value };
|
||||||
this._errors = undefined;
|
this._errors = undefined;
|
||||||
this._dirty = true;
|
this._dirty = true;
|
||||||
}
|
}
|
||||||
|
@ -175,7 +175,7 @@ class HaConfigHardware extends SubscribeMixin(LitElement) {
|
|||||||
let documentationURL: string | undefined;
|
let documentationURL: string | undefined;
|
||||||
|
|
||||||
if (this._hardwareInfo?.hardware.length) {
|
if (this._hardwareInfo?.hardware.length) {
|
||||||
const boardData = this._hardwareInfo!.hardware[0];
|
const boardData = this._hardwareInfo.hardware[0];
|
||||||
|
|
||||||
boardId = boardData.board.hassio_board_id;
|
boardId = boardData.board.hassio_board_id;
|
||||||
boardName = boardData.name;
|
boardName = boardData.name;
|
||||||
@ -285,7 +285,7 @@ class HaConfigHardware extends SubscribeMixin(LitElement) {
|
|||||||
`
|
`
|
||||||
: ""}
|
: ""}
|
||||||
${this._systemStatusData
|
${this._systemStatusData
|
||||||
? html` <ha-card outlined>
|
? html`<ha-card outlined>
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
${this.hass.localize(
|
${this.hass.localize(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user