mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 01:06:35 +00:00
Use fallback for device name on device page (#5116)
* Use fallback for device name on device page * Update ha-config-device-page.ts * Lint
This commit is contained in:
parent
dd2163a837
commit
1f143176ad
@ -25,6 +25,7 @@ import {
|
||||
} from "../../../data/entity_registry";
|
||||
import {
|
||||
DeviceRegistryEntry,
|
||||
computeDeviceName,
|
||||
updateDeviceRegistryEntry,
|
||||
} from "../../../data/device_registry";
|
||||
import { AreaRegistryEntry } from "../../../data/area_registry";
|
||||
@ -124,7 +125,9 @@ export class HaConfigDevicePage extends LitElement {
|
||||
${
|
||||
this.narrow
|
||||
? html`
|
||||
<span slot="header">${device.name_by_user || device.name}</span>
|
||||
<span slot="header">
|
||||
${computeDeviceName(device, this.hass)}
|
||||
</span>
|
||||
`
|
||||
: ""
|
||||
}
|
||||
@ -142,7 +145,7 @@ export class HaConfigDevicePage extends LitElement {
|
||||
this.narrow
|
||||
? ""
|
||||
: html`
|
||||
<h1>${device.name_by_user || device.name}</h1>
|
||||
<h1>${computeDeviceName(device, this.hass)}</h1>
|
||||
`
|
||||
}
|
||||
<ha-device-card
|
||||
|
Loading…
x
Reference in New Issue
Block a user