mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Add model_id to device info card (#21417)
* Add model_id to device info card * Update src/panels/config/devices/device-detail/ha-device-info-card.ts Co-authored-by: Paul Bottein <paul.bottein@gmail.com> * Add model_id to device info card --------- Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
This commit is contained in:
parent
7468ab985a
commit
30d0293a4b
@ -53,6 +53,7 @@ const DEVICES = [
|
|||||||
identifiers: [["demo", "volume1"] as [string, string]],
|
identifiers: [["demo", "volume1"] as [string, string]],
|
||||||
manufacturer: null,
|
manufacturer: null,
|
||||||
model: null,
|
model: null,
|
||||||
|
model_id: null,
|
||||||
name_by_user: null,
|
name_by_user: null,
|
||||||
name: "Dishwasher",
|
name: "Dishwasher",
|
||||||
sw_version: null,
|
sw_version: null,
|
||||||
@ -72,6 +73,7 @@ const DEVICES = [
|
|||||||
identifiers: [["demo", "pwm1"] as [string, string]],
|
identifiers: [["demo", "pwm1"] as [string, string]],
|
||||||
manufacturer: null,
|
manufacturer: null,
|
||||||
model: null,
|
model: null,
|
||||||
|
model_id: null,
|
||||||
name_by_user: null,
|
name_by_user: null,
|
||||||
name: "Lamp",
|
name: "Lamp",
|
||||||
sw_version: null,
|
sw_version: null,
|
||||||
@ -91,6 +93,7 @@ const DEVICES = [
|
|||||||
identifiers: [["demo", "pwm1"] as [string, string]],
|
identifiers: [["demo", "pwm1"] as [string, string]],
|
||||||
manufacturer: null,
|
manufacturer: null,
|
||||||
model: null,
|
model: null,
|
||||||
|
model_id: null,
|
||||||
name_by_user: "User name",
|
name_by_user: "User name",
|
||||||
name: "Technical name",
|
name: "Technical name",
|
||||||
sw_version: null,
|
sw_version: null,
|
||||||
|
@ -53,6 +53,7 @@ const DEVICES = [
|
|||||||
identifiers: [["demo", "volume1"] as [string, string]],
|
identifiers: [["demo", "volume1"] as [string, string]],
|
||||||
manufacturer: null,
|
manufacturer: null,
|
||||||
model: null,
|
model: null,
|
||||||
|
model_id: null,
|
||||||
name_by_user: null,
|
name_by_user: null,
|
||||||
name: "Dishwasher",
|
name: "Dishwasher",
|
||||||
sw_version: null,
|
sw_version: null,
|
||||||
@ -72,6 +73,7 @@ const DEVICES = [
|
|||||||
identifiers: [["demo", "pwm1"] as [string, string]],
|
identifiers: [["demo", "pwm1"] as [string, string]],
|
||||||
manufacturer: null,
|
manufacturer: null,
|
||||||
model: null,
|
model: null,
|
||||||
|
model_id: null,
|
||||||
name_by_user: null,
|
name_by_user: null,
|
||||||
name: "Lamp",
|
name: "Lamp",
|
||||||
sw_version: null,
|
sw_version: null,
|
||||||
@ -91,6 +93,7 @@ const DEVICES = [
|
|||||||
identifiers: [["demo", "pwm1"] as [string, string]],
|
identifiers: [["demo", "pwm1"] as [string, string]],
|
||||||
manufacturer: null,
|
manufacturer: null,
|
||||||
model: null,
|
model: null,
|
||||||
|
model_id: null,
|
||||||
name_by_user: "User name",
|
name_by_user: "User name",
|
||||||
name: "Technical name",
|
name: "Technical name",
|
||||||
sw_version: null,
|
sw_version: null,
|
||||||
|
@ -215,6 +215,7 @@ const createDeviceRegistryEntries = (
|
|||||||
connections: [],
|
connections: [],
|
||||||
manufacturer: "ESPHome",
|
manufacturer: "ESPHome",
|
||||||
model: "Mock Device",
|
model: "Mock Device",
|
||||||
|
model_id: "ABC-001",
|
||||||
name: "Tag Reader",
|
name: "Tag Reader",
|
||||||
sw_version: null,
|
sw_version: null,
|
||||||
hw_version: "1.0.0",
|
hw_version: "1.0.0",
|
||||||
|
@ -20,6 +20,7 @@ export interface DeviceRegistryEntry {
|
|||||||
identifiers: Array<[string, string]>;
|
identifiers: Array<[string, string]>;
|
||||||
manufacturer: string | null;
|
manufacturer: string | null;
|
||||||
model: string | null;
|
model: string | null;
|
||||||
|
model_id: string | null;
|
||||||
name: string | null;
|
name: string | null;
|
||||||
labels: string[];
|
labels: string[];
|
||||||
sw_version: string | null;
|
sw_version: string | null;
|
||||||
|
@ -31,8 +31,13 @@ export class HaDeviceCard extends LitElement {
|
|||||||
>
|
>
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
${this.device.model
|
${this.device.model
|
||||||
? html`<div class="model">${this.device.model}</div>`
|
? html`<div class="model">
|
||||||
: ""}
|
${this.device.model}
|
||||||
|
${this.device.model_id ? html`(${this.device.model_id})` : ""}
|
||||||
|
</div>`
|
||||||
|
: this.device.model_id
|
||||||
|
? html`<div class="model">${this.device.model_id}</div>`
|
||||||
|
: ""}
|
||||||
${this.device.manufacturer
|
${this.device.manufacturer
|
||||||
? html`
|
? html`
|
||||||
<div class="manuf">
|
<div class="manuf">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user