mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-26 06:17:20 +00:00
Clear warnings when yaml changes (#10820)
This commit is contained in:
parent
24e8028e8f
commit
0a7b703d57
@ -138,7 +138,8 @@ export default class HaAutomationConditionEditor extends LitElement {
|
|||||||
if (!ev.detail.isValid) {
|
if (!ev.detail.isValid) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fireEvent(this, "value-changed", { value: ev.detail.value });
|
// @ts-ignore
|
||||||
|
fireEvent(this, "value-changed", { value: ev.detail.value, yaml: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles(): CSSResultGroup {
|
static get styles(): CSSResultGroup {
|
||||||
|
@ -109,6 +109,7 @@ export default class HaAutomationConditionRow extends LitElement {
|
|||||||
: ""}
|
: ""}
|
||||||
<ha-automation-condition-editor
|
<ha-automation-condition-editor
|
||||||
@ui-mode-not-available=${this._handleUiModeNotAvailable}
|
@ui-mode-not-available=${this._handleUiModeNotAvailable}
|
||||||
|
@value-changed=${this._handleChangeEvent}
|
||||||
.yamlMode=${this._yamlMode}
|
.yamlMode=${this._yamlMode}
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
.condition=${this.condition}
|
.condition=${this.condition}
|
||||||
@ -127,6 +128,12 @@ export default class HaAutomationConditionRow extends LitElement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private _handleChangeEvent(ev: CustomEvent) {
|
||||||
|
if (ev.detail.yaml) {
|
||||||
|
this._warnings = undefined;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private _handleAction(ev: CustomEvent<ActionDetail>) {
|
private _handleAction(ev: CustomEvent<ActionDetail>) {
|
||||||
switch (ev.detail.index) {
|
switch (ev.detail.index) {
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -291,6 +291,7 @@ export default class HaAutomationTriggerRow extends LitElement {
|
|||||||
if (!ev.detail.isValid) {
|
if (!ev.detail.isValid) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this._warnings = undefined;
|
||||||
fireEvent(this, "value-changed", { value: ev.detail.value });
|
fireEvent(this, "value-changed", { value: ev.detail.value });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user