Skip to content

Commit

Permalink
add demo types
Browse files Browse the repository at this point in the history
  • Loading branch information
bramkragten committed Dec 5, 2024
1 parent bda0642 commit 26e8b14
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions demo/src/ha-demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions gallery/src/pages/components/ha-form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions gallery/src/pages/components/ha-selector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions gallery/src/pages/misc/integration-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -215,6 +217,7 @@ const createDeviceRegistryEntries = (
{
entry_type: null,
config_entries: [item.entry_id],
config_subentries: {},
connections: [],
manufacturer: "ESPHome",
model: "Mock Device",
Expand Down
1 change: 0 additions & 1 deletion src/data/config_entries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export interface ConfigEntry {
reason: string | null;
error_reason_translation_key: string | null;
error_reason_translation_placeholders: Record<string, string> | null;
subentries: SubConfigEntry[];
}

export interface SubConfigEntry {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 26e8b14

Please sign in to comment.