diff --git a/src/panels/lovelace/components/notifications/hui-notifications-button.ts b/src/panels/lovelace/components/notifications/hui-notifications-button.ts index f58f3425aa..c56d2931a1 100644 --- a/src/panels/lovelace/components/notifications/hui-notifications-button.ts +++ b/src/panels/lovelace/components/notifications/hui-notifications-button.ts @@ -9,6 +9,13 @@ import { import "@polymer/paper-icon-button/paper-icon-button"; import { fireEvent } from "../../../../common/dom/fire_event"; +declare global { + // tslint:disable-next-line + interface HASSDomEvents { + "opened-changed": { value: boolean }; + } +} + class HuiNotificationsButton extends LitElement { @property() public notifications?: string[]; @property() public opened?: boolean; @@ -19,7 +26,7 @@ class HuiNotificationsButton extends LitElement { icon="hass:bell" @click="${this._clicked}" > - ${this.notifications + ${this.notifications && this.notifications.length > 0 ? html`
${this.notifications.length}
diff --git a/src/panels/lovelace/hui-root.ts b/src/panels/lovelace/hui-root.ts index a7da02aca9..e2973b7573 100644 --- a/src/panels/lovelace/hui-root.ts +++ b/src/panels/lovelace/hui-root.ts @@ -57,13 +57,6 @@ const JS_CACHE = {}; let loadedUnusedEntities = false; -declare global { - // tslint:disable-next-line - interface HASSDomEvents { - "opened-changed": { value: boolean }; - } -} - class HUIRoot extends LitElement { public narrow?: boolean; public showMenu?: boolean;