mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +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]],
|
||||
manufacturer: null,
|
||||
model: null,
|
||||
model_id: null,
|
||||
name_by_user: null,
|
||||
name: "Dishwasher",
|
||||
sw_version: null,
|
||||
@ -72,6 +73,7 @@ const DEVICES = [
|
||||
identifiers: [["demo", "pwm1"] as [string, string]],
|
||||
manufacturer: null,
|
||||
model: null,
|
||||
model_id: null,
|
||||
name_by_user: null,
|
||||
name: "Lamp",
|
||||
sw_version: null,
|
||||
@ -91,6 +93,7 @@ const DEVICES = [
|
||||
identifiers: [["demo", "pwm1"] as [string, string]],
|
||||
manufacturer: null,
|
||||
model: null,
|
||||
model_id: null,
|
||||
name_by_user: "User name",
|
||||
name: "Technical name",
|
||||
sw_version: null,
|
||||
|
@ -53,6 +53,7 @@ const DEVICES = [
|
||||
identifiers: [["demo", "volume1"] as [string, string]],
|
||||
manufacturer: null,
|
||||
model: null,
|
||||
model_id: null,
|
||||
name_by_user: null,
|
||||
name: "Dishwasher",
|
||||
sw_version: null,
|
||||
@ -72,6 +73,7 @@ const DEVICES = [
|
||||
identifiers: [["demo", "pwm1"] as [string, string]],
|
||||
manufacturer: null,
|
||||
model: null,
|
||||
model_id: null,
|
||||
name_by_user: null,
|
||||
name: "Lamp",
|
||||
sw_version: null,
|
||||
@ -91,6 +93,7 @@ const DEVICES = [
|
||||
identifiers: [["demo", "pwm1"] as [string, string]],
|
||||
manufacturer: null,
|
||||
model: null,
|
||||
model_id: null,
|
||||
name_by_user: "User name",
|
||||
name: "Technical name",
|
||||
sw_version: null,
|
||||
|
@ -215,6 +215,7 @@ const createDeviceRegistryEntries = (
|
||||
connections: [],
|
||||
manufacturer: "ESPHome",
|
||||
model: "Mock Device",
|
||||
model_id: "ABC-001",
|
||||
name: "Tag Reader",
|
||||
sw_version: null,
|
||||
hw_version: "1.0.0",
|
||||
|
@ -20,6 +20,7 @@ export interface DeviceRegistryEntry {
|
||||
identifiers: Array<[string, string]>;
|
||||
manufacturer: string | null;
|
||||
model: string | null;
|
||||
model_id: string | null;
|
||||
name: string | null;
|
||||
labels: string[];
|
||||
sw_version: string | null;
|
||||
|
@ -31,8 +31,13 @@ export class HaDeviceCard extends LitElement {
|
||||
>
|
||||
<div class="card-content">
|
||||
${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
|
||||
? html`
|
||||
<div class="manuf">
|
||||
|
Loading…
x
Reference in New Issue
Block a user