mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 11:16:35 +00:00
Hide hardware integrations without entities (#24986)
This commit is contained in:
parent
80151ff759
commit
4fd87a1d7c
@ -170,6 +170,7 @@ class HaConfigIntegrationsDashboard extends KeyboardShortcutMixin(
|
|||||||
components: string[],
|
components: string[],
|
||||||
manifests: Record<string, IntegrationManifest>,
|
manifests: Record<string, IntegrationManifest>,
|
||||||
configEntries: ConfigEntryExtended[],
|
configEntries: ConfigEntryExtended[],
|
||||||
|
entityEntries: EntityRegistryEntry[],
|
||||||
localize: HomeAssistant["localize"],
|
localize: HomeAssistant["localize"],
|
||||||
filter?: string
|
filter?: string
|
||||||
): [
|
): [
|
||||||
@ -218,7 +219,16 @@ class HaConfigIntegrationsDashboard extends KeyboardShortcutMixin(
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
const allEntries = [...configEntries, ...nonConfigEntry];
|
const allEntries = [
|
||||||
|
...configEntries.filter(
|
||||||
|
(entry) =>
|
||||||
|
this._manifests[entry.domain]?.integration_type !== "hardware" ||
|
||||||
|
entityEntries.find(
|
||||||
|
(entity) => entity.config_entry_id === entry.entry_id
|
||||||
|
)
|
||||||
|
),
|
||||||
|
...nonConfigEntry,
|
||||||
|
];
|
||||||
|
|
||||||
let filteredConfigEntries: ConfigEntryExtended[];
|
let filteredConfigEntries: ConfigEntryExtended[];
|
||||||
const ignored: ConfigEntryExtended[] = [];
|
const ignored: ConfigEntryExtended[] = [];
|
||||||
@ -380,6 +390,7 @@ class HaConfigIntegrationsDashboard extends KeyboardShortcutMixin(
|
|||||||
this.hass.config.components,
|
this.hass.config.components,
|
||||||
this._manifests,
|
this._manifests,
|
||||||
this.configEntries,
|
this.configEntries,
|
||||||
|
this._entityRegistryEntries,
|
||||||
this.hass.localize,
|
this.hass.localize,
|
||||||
this._filter
|
this._filter
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user