mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Add serial number to the device info card (#18386)
Co-authored-by: Bram Kragten <mail@bramkragten.nl> Co-authored-by: Franck Nijhof <frenck@frenck.nl> Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
parent
464ecffda7
commit
7ce7cbb755
@ -57,6 +57,7 @@ const DEVICES = [
|
||||
sw_version: null,
|
||||
hw_version: null,
|
||||
via_device_id: null,
|
||||
serial_number: null,
|
||||
},
|
||||
{
|
||||
area_id: "backyard",
|
||||
@ -74,6 +75,7 @@ const DEVICES = [
|
||||
sw_version: null,
|
||||
hw_version: null,
|
||||
via_device_id: null,
|
||||
serial_number: null,
|
||||
},
|
||||
{
|
||||
area_id: null,
|
||||
@ -91,6 +93,7 @@ const DEVICES = [
|
||||
sw_version: null,
|
||||
hw_version: null,
|
||||
via_device_id: null,
|
||||
serial_number: null,
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -53,6 +53,7 @@ const DEVICES = [
|
||||
sw_version: null,
|
||||
hw_version: null,
|
||||
via_device_id: null,
|
||||
serial_number: null,
|
||||
},
|
||||
{
|
||||
area_id: "backyard",
|
||||
@ -70,6 +71,7 @@ const DEVICES = [
|
||||
sw_version: null,
|
||||
hw_version: null,
|
||||
via_device_id: null,
|
||||
serial_number: null,
|
||||
},
|
||||
{
|
||||
area_id: null,
|
||||
@ -87,6 +89,7 @@ const DEVICES = [
|
||||
sw_version: null,
|
||||
hw_version: null,
|
||||
via_device_id: null,
|
||||
serial_number: null,
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -213,6 +213,7 @@ const createDeviceRegistryEntries = (
|
||||
name: "Tag Reader",
|
||||
sw_version: null,
|
||||
hw_version: "1.0.0",
|
||||
serial_number: "00_12_4B_00_22_98_88_7F",
|
||||
id: "mock-device-id",
|
||||
identifiers: [],
|
||||
via_device_id: null,
|
||||
|
@ -20,6 +20,7 @@ export interface DeviceRegistryEntry {
|
||||
name: string | null;
|
||||
sw_version: string | null;
|
||||
hw_version: string | null;
|
||||
serial_number: string | null;
|
||||
via_device_id: string | null;
|
||||
area_id: string | null;
|
||||
name_by_user: string | null;
|
||||
|
@ -96,6 +96,16 @@ export class HaDeviceCard extends LitElement {
|
||||
</div>
|
||||
`
|
||||
: ""}
|
||||
${this.device.serial_number
|
||||
? html`
|
||||
<div class="extra-info">
|
||||
${this.hass.localize(
|
||||
"ui.panel.config.integrations.config_entry.serial_number",
|
||||
{ serial_number: this.device.serial_number }
|
||||
)}
|
||||
</div>
|
||||
`
|
||||
: ""}
|
||||
<slot></slot>
|
||||
</div>
|
||||
<slot name="actions"></slot>
|
||||
|
@ -3613,6 +3613,7 @@
|
||||
"firmware": "Firmware: {version}",
|
||||
"hardware": "Hardware: {version}",
|
||||
"version": "Version: {version}",
|
||||
"serial_number": "Serial number: {serial_number}",
|
||||
"unnamed_entry": "Unnamed entry",
|
||||
"unknown_via_device": "Unknown device",
|
||||
"area": "In {area}",
|
||||
|
Loading…
x
Reference in New Issue
Block a user