diff --git a/gallery/src/pages/components/ha-form.ts b/gallery/src/pages/components/ha-form.ts index 05591dcee39f..dc8fdb5c5151 100644 --- a/gallery/src/pages/components/ha-form.ts +++ b/gallery/src/pages/components/ha-form.ts @@ -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, }, ]; diff --git a/gallery/src/pages/components/ha-selector.ts b/gallery/src/pages/components/ha-selector.ts index 4cdc97013b55..004bb3f4066f 100644 --- a/gallery/src/pages/components/ha-selector.ts +++ b/gallery/src/pages/components/ha-selector.ts @@ -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, }, ]; diff --git a/gallery/src/pages/misc/integration-card.ts b/gallery/src/pages/misc/integration-card.ts index 5b4dda93eeb0..ad0e1f2bca38 100644 --- a/gallery/src/pages/misc/integration-card.ts +++ b/gallery/src/pages/misc/integration-card.ts @@ -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, diff --git a/src/data/device_registry.ts b/src/data/device_registry.ts index 37685de00792..6995e4b92443 100644 --- a/src/data/device_registry.ts +++ b/src/data/device_registry.ts @@ -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; diff --git a/src/panels/config/devices/device-detail/ha-device-info-card.ts b/src/panels/config/devices/device-detail/ha-device-info-card.ts index 219031a40389..03818c1fe0f0 100644 --- a/src/panels/config/devices/device-detail/ha-device-info-card.ts +++ b/src/panels/config/devices/device-detail/ha-device-info-card.ts @@ -96,6 +96,16 @@ export class HaDeviceCard extends LitElement { ` : ""} + ${this.device.serial_number + ? html` +