use logical device type (#4524)

This commit is contained in:
David F. Mulcahey 2020-01-20 06:14:47 -05:00 committed by Bram Kragten
parent ef2ca4a07f
commit 9d333fb557
2 changed files with 5 additions and 1 deletions

View File

@ -22,6 +22,7 @@ export interface ZHADevice {
user_given_name?: string;
power_source?: string;
area_id?: string;
device_type: string;
}
export interface Attribute {

View File

@ -163,6 +163,8 @@ class ZHADeviceCard extends LitElement {
<dd class="zha-info">${this.device!.ieee}</dd>
<dt>Nwk:</dt>
<dd class="zha-info">${formatAsPaddedHex(this.device!.nwk)}</dd>
<dt>Device Type:</dt>
<dd class="zha-info">${this.device!.device_type}</dd>
<dt>LQI:</dt>
<dd class="zha-info">${this.device!.lqi ||
this.hass!.localize("ui.dialogs.zha_device_info.unknown")}</dd>
@ -304,7 +306,8 @@ class ZHADeviceCard extends LitElement {
</div>
`
: ""}
${this.device!.power_source === "Mains"
${this.device!.power_source === "Mains" &&
this.device!.device_type === "Router"
? html`
<mwc-button @click=${this._onAddDevicesClick}>
${this.hass!.localize(