Fix issue with jumping config (#8355)

This commit is contained in:
Joakim Sørensen 2021-02-08 16:18:01 +01:00 committed by GitHub
parent 1d498349c5
commit b75dc0efe0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -150,13 +150,11 @@ class HassioAddonConfig extends LitElement {
if (this.addon.schema && this._canShowSchema && !this._yamlMode) {
this._valid = true;
this._configHasChanged = true;
this._options! = ev.detail.value;
} else {
this._configHasChanged = true;
this._valid = ev.detail.isValid;
}
if (this._valid) {
this._options! = ev.detail.value;
}
}
private async _resetTapped(ev: CustomEvent): Promise<void> {
@ -204,8 +202,9 @@ class HassioAddonConfig extends LitElement {
try {
await setHassioAddonOption(this.hass, this.addon.slug, {
options: this._options!,
options: this._yamlMode ? this._editor?.value : this._options,
});
this._configHasChanged = false;
const eventdata = {
success: true,