mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Add hardware version to the device info card (#10914)
This commit is contained in:
parent
4ebdca2a46
commit
6f9b2ee569
@ -206,6 +206,7 @@ const createDeviceRegistryEntries = (
|
|||||||
model: "Mock Device",
|
model: "Mock Device",
|
||||||
name: "Tag Reader",
|
name: "Tag Reader",
|
||||||
sw_version: null,
|
sw_version: null,
|
||||||
|
hw_version: "1.0.0",
|
||||||
id: "mock-device-id",
|
id: "mock-device-id",
|
||||||
identifiers: [],
|
identifiers: [],
|
||||||
via_device_id: null,
|
via_device_id: null,
|
||||||
|
@ -13,6 +13,7 @@ export interface DeviceRegistryEntry {
|
|||||||
model: string | null;
|
model: string | null;
|
||||||
name: string | null;
|
name: string | null;
|
||||||
sw_version: string | null;
|
sw_version: string | null;
|
||||||
|
hw_version: string | null;
|
||||||
via_device_id: string | null;
|
via_device_id: string | null;
|
||||||
area_id: string | null;
|
area_id: string | null;
|
||||||
name_by_user: string | null;
|
name_by_user: string | null;
|
||||||
|
@ -66,6 +66,17 @@ export class HaDeviceCard extends LitElement {
|
|||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
: ""}
|
: ""}
|
||||||
|
${this.device.hw_version
|
||||||
|
? html`
|
||||||
|
<div class="extra-info">
|
||||||
|
${this.hass.localize(
|
||||||
|
"ui.panel.config.integrations.config_entry.hardware",
|
||||||
|
"version",
|
||||||
|
this.device.hw_version
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
`
|
||||||
|
: ""}
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
<slot name="actions"></slot>
|
<slot name="actions"></slot>
|
||||||
|
@ -2444,6 +2444,7 @@
|
|||||||
"manuf": "by {manufacturer}",
|
"manuf": "by {manufacturer}",
|
||||||
"via": "Connected via",
|
"via": "Connected via",
|
||||||
"firmware": "Firmware: {version}",
|
"firmware": "Firmware: {version}",
|
||||||
|
"hardware": "Hardware: {version}",
|
||||||
"unnamed_entry": "Unnamed entry",
|
"unnamed_entry": "Unnamed entry",
|
||||||
"unknown_via_device": "Unknown device",
|
"unknown_via_device": "Unknown device",
|
||||||
"area": "In {area}",
|
"area": "In {area}",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user