Hide blank manufacturer names on Device details page (#4543)

* don't show "by" when there is no manufacturer

* Update src/panels/config/devices/device-detail/ha-device-card.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
David F. Mulcahey 2020-01-21 10:26:32 -05:00 committed by Bram Kragten
parent 323cf72be3
commit 9c407caf2c

View File

@ -31,13 +31,17 @@ export class HaDeviceCard extends LitElement {
<div class="card-content">
<div class="info">
<div class="model">${this.device.model}</div>
<div class="manuf">
${this.hass.localize(
"ui.panel.config.integrations.config_entry.manuf",
"manufacturer",
this.device.manufacturer
)}
</div>
${this.device.manufacturer
? html`
<div class="manuf">
${this.hass.localize(
"ui.panel.config.integrations.config_entry.manuf",
"manufacturer",
this.device.manufacturer
)}
</div>
`
: ""}
${this.device.area_id
? html`
<div class="area">