From 90f12eea5e9bd93504bc7c7e8d8a63e82535d391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Wed, 26 Aug 2020 17:41:02 +0200 Subject: [PATCH] Limit changing network to systems that have that support (#6711) --- hassio/src/system/hassio-host-info.ts | 35 +++++++++++++++------------ 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/hassio/src/system/hassio-host-info.ts b/hassio/src/system/hassio-host-info.ts index b8bd35fca5..38ea35fa21 100644 --- a/hassio/src/system/hassio-host-info.ts +++ b/hassio/src/system/hassio-host-info.ts @@ -59,7 +59,9 @@ class HassioHostInfo extends LitElement { @internalProperty() public _networkInfo?: NetworkInfo; public render(): TemplateResult | void { - const primaryIpAddress = this._primaryIpAddress(this._networkInfo!); + const primaryIpAddress = this.hostInfo.features.includes("network") + ? this._primaryIpAddress(this._networkInfo!) + : ""; return html`
@@ -79,20 +81,23 @@ class HassioHostInfo extends LitElement { ` : ""} - - - IP address - - - ${primaryIpAddress} - - - - + ${this.hostInfo.features.includes("network") + ? html` + + IP address + + + ${primaryIpAddress} + + + + ` + : ""} + Operating system