mirror of
https://github.com/home-assistant/frontend.git
synced 2025-12-20 02:38:53 +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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user