From 243cf4ea9f378408429c216a1d2aa83a7f5bf959 Mon Sep 17 00:00:00 2001 From: Andre Lengwenus Date: Fri, 23 Aug 2024 15:03:57 +0200 Subject: [PATCH] Remove entity_id from LcnEntityConfig (#11) --- src/dialogs/lcn-create-entity-dialog.ts | 3 +-- src/lcn-entities-data-table.ts | 5 ++--- src/types/lcn.ts | 15 +++++++-------- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/dialogs/lcn-create-entity-dialog.ts b/src/dialogs/lcn-create-entity-dialog.ts index 7a20102..b8cd255 100644 --- a/src/dialogs/lcn-create-entity-dialog.ts +++ b/src/dialogs/lcn-create-entity-dialog.ts @@ -91,9 +91,8 @@ export class CreateEntityDialog extends LitElement { diff --git a/src/lcn-entities-data-table.ts b/src/lcn-entities-data-table.ts index c30f3bc..f124e9a 100644 --- a/src/lcn-entities-data-table.ts +++ b/src/lcn-entities-data-table.ts @@ -40,7 +40,7 @@ export class LCNEntitiesDataTable extends LitElement { narrow ? { name: { - title: this.lcn.localize("entity-id"), + title: this.lcn.localize("name"), sortable: true, direction: "asc", grows: true, @@ -63,7 +63,7 @@ export class LCNEntitiesDataTable extends LitElement { } : { name: { - title: this.lcn.localize("entity-id"), + title: this.lcn.localize("name"), sortable: true, direction: "asc", grows: true, @@ -109,7 +109,6 @@ export class LCNEntitiesDataTable extends LitElement { .dir=${computeRTLDirection(this.hass)} auto-height clickable - .id=${"entity_id"} > `; } diff --git a/src/types/lcn.ts b/src/types/lcn.ts index 01cbab8..3d3a48c 100644 --- a/src/types/lcn.ts +++ b/src/types/lcn.ts @@ -58,14 +58,13 @@ export interface LcnEntityConfig { domain: string; resource: string; domain_data: - | BinarySensorConfig[] - | ClimateConfig[] - | CoverConfig[] - | LightConfig[] - | SceneConfig[] - | SensorConfig[] - | SwitchConfig[]; - entity_id: string; + | BinarySensorConfig + | ClimateConfig + | CoverConfig + | LightConfig + | SceneConfig + | SensorConfig + | SwitchConfig; } export interface LcnDeviceConfig {