From f7c7ac44f7cd6bd45cd5664ca3b88c5bd6b50ecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Wed, 3 Feb 2021 15:52:52 +0100 Subject: [PATCH] Show eMMC lifetime (#8302) --- hassio/src/system/hassio-host-info.ts | 12 ++++++++++++ src/data/hassio/host.ts | 1 + 2 files changed, 13 insertions(+) diff --git a/hassio/src/system/hassio-host-info.ts b/hassio/src/system/hassio-host-info.ts index 773fcc8bab..b4fd17f9b2 100644 --- a/hassio/src/system/hassio-host-info.ts +++ b/hassio/src/system/hassio-host-info.ts @@ -150,6 +150,18 @@ class HassioHostInfo extends LitElement { : ""}
+ ${this.supervisor.host.disk_life_time !== "" && + this.supervisor.host.disk_life_time >= 10 + ? html` + + eMMC Lifetime Used + + + ${this.supervisor.host.disk_life_time - 10}% - + ${this.supervisor.host.disk_life_time}% + + ` + : ""} ${metrics.map( (metric) => html` diff --git a/src/data/hassio/host.ts b/src/data/hassio/host.ts index 10af5955f8..79e518b4c9 100644 --- a/src/data/hassio/host.ts +++ b/src/data/hassio/host.ts @@ -5,6 +5,7 @@ export type HassioHostInfo = { chassis: string; cpe: string; deployment: string; + disk_life_time: number | ""; disk_free: number; disk_total: number; disk_used: number;