Fix: Critical bug where setting up card was not possible via UI

pull/30/head 2.0.1
Juraj Nyíri 4 years ago
parent 75d6cbc909
commit 38587e966b

@ -19489,12 +19489,12 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement {
return event;
};
this.valueUpdated = () => {
const originalConfig = lodash.clone(this.config);
this.config.protocol = this.protocol.value;
this.config.ip = this.ip.value;
this.config.token = this.token.value;
this.config.port = this.port.value;
if (this.loaded) {
const originalConfig = lodash.clone(this.config);
this.config.protocol = this.protocol.value;
this.config.ip = this.ip.value;
this.config.token = this.token.value;
this.config.port = this.port.value;
if (!this.config.entity) {
this.config.entity = [];
}
@ -19551,9 +19551,9 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement {
this.config.runBefore = this.runBefore.value;
this.config.runAfter = this.runAfter.value;
}
if (!lodash.isEqual(this.config, originalConfig)) {
this.fireEvent(this, 'config-changed', { config: this.config });
}
}
if (!lodash.isEqual(this.config, originalConfig)) {
this.fireEvent(this, 'config-changed', { config: this.config });
}
};
this.render = async () => {

@ -83,12 +83,12 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement {
};
valueUpdated = (): void => {
const originalConfig = _.clone(this.config);
this.config.protocol = this.protocol.value;
this.config.ip = this.ip.value;
this.config.token = this.token.value;
this.config.port = this.port.value;
if (this.loaded) {
const originalConfig = _.clone(this.config);
this.config.protocol = this.protocol.value;
this.config.ip = this.ip.value;
this.config.token = this.token.value;
this.config.port = this.port.value;
if (!this.config.entity) {
this.config.entity = [];
}
@ -141,9 +141,9 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement {
this.config.runBefore = this.runBefore.value;
this.config.runAfter = this.runAfter.value;
}
if (!_.isEqual(this.config, originalConfig)) {
this.fireEvent(this, 'config-changed', { config: this.config });
}
}
if (!_.isEqual(this.config, originalConfig)) {
this.fireEvent(this, 'config-changed', { config: this.config });
}
};

Loading…
Cancel
Save