mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-21 08:16:36 +00:00
Add fallback for devices without name (#23513)
This commit is contained in:
parent
700690474c
commit
884c22f92b
@ -222,7 +222,9 @@ export class HaDevicePicker extends LitElement {
|
||||
|
||||
return {
|
||||
id: device.id,
|
||||
name: name,
|
||||
name:
|
||||
name ||
|
||||
this.hass.localize("ui.components.device-picker.unnamed_device"),
|
||||
area:
|
||||
device.area_id && areas[device.area_id]
|
||||
? areas[device.area_id].name
|
||||
|
@ -530,7 +530,9 @@ export class QuickBar extends LitElement {
|
||||
? this.hass.areas[device.area_id]
|
||||
: undefined;
|
||||
const deviceItem = {
|
||||
primaryText: computeDeviceName(device, this.hass),
|
||||
primaryText:
|
||||
computeDeviceName(device, this.hass) ||
|
||||
this.hass.localize("ui.components.device-picker.unnamed_device"),
|
||||
deviceId: device.id,
|
||||
area: area?.name,
|
||||
action: () => navigate(`/config/devices/device/${device.id}`),
|
||||
|
@ -651,6 +651,7 @@
|
||||
"no_devices": "You don't have any devices",
|
||||
"no_match": "No matching devices found",
|
||||
"device": "Device",
|
||||
"unnamed_device": "Unnamed device",
|
||||
"no_area": "No area"
|
||||
},
|
||||
"category-picker": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user