2.0
Juraj Nyíri 3 years ago
parent 5625d105bf
commit 7e46d45009

@ -19479,7 +19479,9 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement {
if (!lodash.isEmpty(this.entities)) { if (!lodash.isEmpty(this.entities)) {
this.config.entity = []; this.config.entity = [];
lodash.forEach(this.entities, entity => { lodash.forEach(this.entities, entity => {
if (!lodash.isEmpty(entity.value)) {
this.config.entity.push(entity.value); this.config.entity.push(entity.value);
}
}); });
} }
this.fireEvent(this, 'config-changed', { config: this.config }); this.fireEvent(this, 'config-changed', { config: this.config });
@ -19495,6 +19497,7 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement {
if (this.entitiesRegistry) { if (this.entitiesRegistry) {
const entitiesDropDown = document.createElement('paper-dropdown-menu'); const entitiesDropDown = document.createElement('paper-dropdown-menu');
const entities = document.createElement('paper-listbox'); const entities = document.createElement('paper-listbox');
entities.appendChild(addDropdownItem(''));
lodash.forEach(this.entitiesRegistry, entityRegistry => { lodash.forEach(this.entitiesRegistry, entityRegistry => {
if (lodash.isEqual(entityRegistry.platform, 'cast') || if (lodash.isEqual(entityRegistry.platform, 'cast') ||
lodash.isEqual(entityRegistry.platform, 'kodi') || lodash.isEqual(entityRegistry.platform, 'kodi') ||

@ -65,7 +65,9 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement {
if (!_.isEmpty(this.entities)) { if (!_.isEmpty(this.entities)) {
this.config.entity = []; this.config.entity = [];
_.forEach(this.entities, entity => { _.forEach(this.entities, entity => {
if (!_.isEmpty(entity.value)) {
this.config.entity.push(entity.value); this.config.entity.push(entity.value);
}
}); });
} }
this.fireEvent(this, 'config-changed', { config: this.config }); this.fireEvent(this, 'config-changed', { config: this.config });
@ -83,6 +85,7 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement {
const entitiesDropDown: any = document.createElement('paper-dropdown-menu'); const entitiesDropDown: any = document.createElement('paper-dropdown-menu');
const entities: any = document.createElement('paper-listbox'); const entities: any = document.createElement('paper-listbox');
entities.appendChild(addDropdownItem(''));
_.forEach(this.entitiesRegistry, entityRegistry => { _.forEach(this.entitiesRegistry, entityRegistry => {
if ( if (
_.isEqual(entityRegistry.platform, 'cast') || _.isEqual(entityRegistry.platform, 'cast') ||

Loading…
Cancel
Save