From 5dbd5c7395b3a12d75df7d5b8df968a9af25e323 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Wed, 10 Apr 2019 15:38:33 -0700 Subject: [PATCH] Fix hassio unavailable dashboard & update card --- hassio/src/components/hassio-card-content.ts | 6 ++++-- hassio/src/dashboard/hassio-hass-update.js | 21 ++++---------------- 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/hassio/src/components/hassio-card-content.ts b/hassio/src/components/hassio-card-content.ts index d3ebefab48..3e9de6c253 100644 --- a/hassio/src/components/hassio-card-content.ts +++ b/hassio/src/components/hassio-card-content.ts @@ -17,7 +17,7 @@ class HassioCardContent extends LitElement { @property() public hass!: HomeAssistant; @property() public title!: string; @property() public description?: string; - @property({ type: Boolean }) public available: boolean = true; + @property({ type: Boolean }) public available?: boolean; @property() public datetime?: string; @property() public iconTitle?: string; @property() public iconClass?: string; @@ -33,7 +33,9 @@ class HassioCardContent extends LitElement {
${this.title}
- ${this.description} ${this.available ? undefined : " (Not available"} + ${this.description} + ${/* treat as available when undefined */ + this.available === false ? " (Not available)" : ""} ${this.datetime ? html`
-
Update available! 🎉
- +
- + Home Assistant [[hassInfo.last_version]] is available and you + are currently running Home Assistant [[hassInfo.version]]. -

- Read the release notes -

Update Release notes