Improve device information when via device is unknown (#10685)

This commit is contained in:
Erik Montnemery 2021-11-24 09:09:21 +01:00 committed by GitHub
parent 5fd4315789
commit 921763b5f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions

View File

@ -82,9 +82,9 @@ export class HaDeviceCard extends LitElement {
const device = devices.find((dev) => dev.id === deviceId);
return device
? computeDeviceName(device, this.hass)
: `(${this.hass.localize(
"ui.panel.config.integrations.config_entry.device_unavailable"
)})`;
: `<${this.hass.localize(
"ui.panel.config.integrations.config_entry.unknown_via_device"
)}>`;
}
static get styles(): CSSResultGroup {

View File

@ -2370,11 +2370,10 @@
"enable_restart_confirm": "Restart Home Assistant to finish enabling this integration",
"disable_error": "Enabling or disabling of the integration failed",
"manuf": "by {manufacturer}",
"hub": "Connected via",
"via": "Connected via",
"firmware": "Firmware: {version}",
"unnamed_entry": "Unnamed entry",
"device_unavailable": "Device unavailable",
"entity_unavailable": "Entity unavailable",
"unknown_via_device": "Unknown device",
"area": "In {area}",
"no_area": "No Area",
"not_loaded": "Not loaded",