|
|
|
@ -266,6 +266,20 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement {
|
|
|
|
|
}
|
|
|
|
|
this.plexValidSection.appendChild(this.sortOrder);
|
|
|
|
|
|
|
|
|
|
let hasUIConfig = true;
|
|
|
|
|
if (_.isArray(this.config.entity)) {
|
|
|
|
|
// eslint-disable-next-line consistent-return
|
|
|
|
|
_.forEach(this.config.entity, entity => {
|
|
|
|
|
if (_.isObjectLike(entity)) {
|
|
|
|
|
hasUIConfig = false;
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else if (_.isObjectLike(this.config.entity)) {
|
|
|
|
|
hasUIConfig = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (hasUIConfig) {
|
|
|
|
|
const devicesTitle = document.createElement('h2');
|
|
|
|
|
devicesTitle.innerHTML = `Devices Configuration`;
|
|
|
|
|
devicesTitle.style.lineHeight = '29px';
|
|
|
|
@ -299,6 +313,8 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!_.isEmpty(this.sections)) {
|
|
|
|
|
_.forEach(this.sections, (section: Record<string, any>) => {
|
|
|
|
|
libraryItems.appendChild(addDropdownItem(section.title));
|
|
|
|
|