diff --git a/hassio/src/dashboard/hassio-update.ts b/hassio/src/dashboard/hassio-update.ts index 07b532cbae..3414c5fdf7 100644 --- a/hassio/src/dashboard/hassio-update.ts +++ b/hassio/src/dashboard/hassio-update.ts @@ -7,6 +7,7 @@ import { property, customElement, } from "lit-element"; +import "@polymer/iron-icon/iron-icon"; import { HomeAssistant } from "../../../src/types"; import { @@ -33,12 +34,15 @@ export class HassioUpdate extends LitElement { @property() public error?: string; protected render(): TemplateResult | void { - if ( - this.hassInfo.version === this.hassInfo.last_version && - this.supervisorInfo.version === this.supervisorInfo.last_version && - (!this.hassOsInfo || - this.hassOsInfo.version === this.hassOsInfo.version_latest) - ) { + const updatesAvailable: number = [ + this.hassInfo, + this.supervisorInfo, + this.hassOsInfo, + ].filter((value) => { + return !!value && value.version !== value.last_version; + }).length; + + if (!updatesAvailable) { return html``; } @@ -50,6 +54,11 @@ export class HassioUpdate extends LitElement { ` : ""}