From 26e8b1463d30bfa8917aa1a10c66d622500ec1d4 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Thu, 5 Dec 2024 14:10:43 +0100 Subject: [PATCH] add demo types --- demo/src/ha-demo.ts | 2 ++ gallery/src/pages/components/ha-form.ts | 3 +++ gallery/src/pages/components/ha-selector.ts | 3 +++ gallery/src/pages/misc/integration-card.ts | 3 +++ src/data/config_entries.ts | 1 - .../config/integrations/ha-config-integrations-dashboard.ts | 1 + 6 files changed, 12 insertions(+), 1 deletion(-) diff --git a/demo/src/ha-demo.ts b/demo/src/ha-demo.ts index d133aaa5248f..560fef69c30a 100644 --- a/demo/src/ha-demo.ts +++ b/demo/src/ha-demo.ts @@ -65,6 +65,7 @@ export class HaDemo extends HomeAssistantAppEl { mockEntityRegistry(hass, [ { config_entry_id: "co2signal", + config_subentry_id: null, device_id: "co2signal", area_id: null, disabled_by: null, @@ -85,6 +86,7 @@ export class HaDemo extends HomeAssistantAppEl { }, { config_entry_id: "co2signal", + config_subentry_id: null, device_id: "co2signal", area_id: null, disabled_by: null, diff --git a/gallery/src/pages/components/ha-form.ts b/gallery/src/pages/components/ha-form.ts index fe877ad1d8c5..29c3c51f4d49 100644 --- a/gallery/src/pages/components/ha-form.ts +++ b/gallery/src/pages/components/ha-form.ts @@ -48,6 +48,7 @@ const DEVICES: DeviceRegistryEntry[] = [ area_id: "bedroom", configuration_url: null, config_entries: ["config_entry_1"], + config_subentries: {}, connections: [], disabled_by: null, entry_type: null, @@ -71,6 +72,7 @@ const DEVICES: DeviceRegistryEntry[] = [ area_id: "backyard", configuration_url: null, config_entries: ["config_entry_2"], + config_subentries: {}, connections: [], disabled_by: null, entry_type: null, @@ -94,6 +96,7 @@ const DEVICES: DeviceRegistryEntry[] = [ area_id: null, configuration_url: null, config_entries: ["config_entry_3"], + config_subentries: {}, connections: [], disabled_by: null, entry_type: null, diff --git a/gallery/src/pages/components/ha-selector.ts b/gallery/src/pages/components/ha-selector.ts index a63348539617..c9280b3b2768 100644 --- a/gallery/src/pages/components/ha-selector.ts +++ b/gallery/src/pages/components/ha-selector.ts @@ -47,6 +47,7 @@ const DEVICES: DeviceRegistryEntry[] = [ area_id: "bedroom", configuration_url: null, config_entries: ["config_entry_1"], + config_subentries: {}, connections: [], disabled_by: null, entry_type: null, @@ -70,6 +71,7 @@ const DEVICES: DeviceRegistryEntry[] = [ area_id: "backyard", configuration_url: null, config_entries: ["config_entry_2"], + config_subentries: {}, connections: [], disabled_by: null, entry_type: null, @@ -93,6 +95,7 @@ const DEVICES: DeviceRegistryEntry[] = [ area_id: null, configuration_url: null, config_entries: ["config_entry_3"], + config_subentries: {}, connections: [], disabled_by: null, entry_type: null, diff --git a/gallery/src/pages/misc/integration-card.ts b/gallery/src/pages/misc/integration-card.ts index 0f543aedf775..6c0a6da6af59 100644 --- a/gallery/src/pages/misc/integration-card.ts +++ b/gallery/src/pages/misc/integration-card.ts @@ -33,6 +33,7 @@ const createConfigEntry = ( supports_unload: true, supports_reconfigure: true, supports_subentries: false, + num_subentries: 0, disabled_by: null, pref_disable_new_entities: false, pref_disable_polling: false, @@ -189,6 +190,7 @@ const createEntityRegistryEntries = ( ): EntityRegistryEntry[] => [ { config_entry_id: item.entry_id, + config_subentry_id: null, device_id: "mock-device-id", area_id: null, disabled_by: null, @@ -215,6 +217,7 @@ const createDeviceRegistryEntries = ( { entry_type: null, config_entries: [item.entry_id], + config_subentries: {}, connections: [], manufacturer: "ESPHome", model: "Mock Device", diff --git a/src/data/config_entries.ts b/src/data/config_entries.ts index 94d6173e5c41..0ac58004fbd5 100644 --- a/src/data/config_entries.ts +++ b/src/data/config_entries.ts @@ -27,7 +27,6 @@ export interface ConfigEntry { reason: string | null; error_reason_translation_key: string | null; error_reason_translation_placeholders: Record | null; - subentries: SubConfigEntry[]; } export interface SubConfigEntry { diff --git a/src/panels/config/integrations/ha-config-integrations-dashboard.ts b/src/panels/config/integrations/ha-config-integrations-dashboard.ts index dd5df98553a5..bda47912531c 100644 --- a/src/panels/config/integrations/ha-config-integrations-dashboard.ts +++ b/src/panels/config/integrations/ha-config-integrations-dashboard.ts @@ -205,6 +205,7 @@ class HaConfigIntegrationsDashboard extends SubscribeMixin(LitElement) { supports_unload: false, supports_reconfigure: false, supports_subentries: false, + num_subentries: 0, pref_disable_new_entities: false, pref_disable_polling: false, disabled_by: null,