diff --git a/dist/plex-meets-homeassistant.js b/dist/plex-meets-homeassistant.js index d79e537..f548b57 100644 --- a/dist/plex-meets-homeassistant.js +++ b/dist/plex-meets-homeassistant.js @@ -19479,7 +19479,9 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement { if (!lodash.isEmpty(this.entities)) { this.config.entity = []; lodash.forEach(this.entities, entity => { - this.config.entity.push(entity.value); + if (!lodash.isEmpty(entity.value)) { + this.config.entity.push(entity.value); + } }); } this.fireEvent(this, 'config-changed', { config: this.config }); @@ -19495,6 +19497,7 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement { if (this.entitiesRegistry) { const entitiesDropDown = document.createElement('paper-dropdown-menu'); const entities = document.createElement('paper-listbox'); + entities.appendChild(addDropdownItem('')); lodash.forEach(this.entitiesRegistry, entityRegistry => { if (lodash.isEqual(entityRegistry.platform, 'cast') || lodash.isEqual(entityRegistry.platform, 'kodi') || diff --git a/src/editor.ts b/src/editor.ts index c8b58b2..94faa54 100644 --- a/src/editor.ts +++ b/src/editor.ts @@ -65,7 +65,9 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement { if (!_.isEmpty(this.entities)) { this.config.entity = []; _.forEach(this.entities, entity => { - this.config.entity.push(entity.value); + if (!_.isEmpty(entity.value)) { + this.config.entity.push(entity.value); + } }); } 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 entities: any = document.createElement('paper-listbox'); + entities.appendChild(addDropdownItem('')); _.forEach(this.entitiesRegistry, entityRegistry => { if ( _.isEqual(entityRegistry.platform, 'cast') ||