Show eMMC lifetime (#8302)

This commit is contained in:
Joakim Sørensen 2021-02-03 15:52:52 +01:00 committed by GitHub
parent 62dd0a561e
commit f7c7ac44f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 0 deletions

View File

@ -150,6 +150,18 @@ class HassioHostInfo extends LitElement {
: ""}
</div>
<div>
${this.supervisor.host.disk_life_time !== "" &&
this.supervisor.host.disk_life_time >= 10
? html` <ha-settings-row>
<span slot="heading">
eMMC Lifetime Used
</span>
<span slot="description">
${this.supervisor.host.disk_life_time - 10}% -
${this.supervisor.host.disk_life_time}%
</span>
</ha-settings-row>`
: ""}
${metrics.map(
(metric) =>
html`

View File

@ -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;