Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/data/integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ export const integrationIssuesUrl = (
manifest.issue_tracker ||
`https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+${domain}%22`;

export const domainToName = (localize: LocalizeFunc, domain: string) =>
localize(`component.${domain}.title`) || domain;
export const domainToName = (
localize: LocalizeFunc,
domain: string,
manifest?: IntegrationManifest
) => localize(`component.${domain}.title`) || manifest?.name || domain;

export const fetchIntegrationManifests = (hass: HomeAssistant) =>
hass.callWS<IntegrationManifest[]>({ type: "manifest/list" });
Expand Down
10 changes: 8 additions & 2 deletions src/panels/config/info/integrations-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ class IntegrationsCard extends LitElement {
};

private _sortedIntegrations = memoizeOne((components: string[]) => {
return components.filter((comp) => !comp.includes(".")).sort();
return Array.from(
new Set(
components
.map((comp) => (comp.includes(".") ? comp.split(".")[1] : comp))
.sort()
)
);
Comment thread
bdraco marked this conversation as resolved.
Outdated
});

firstUpdated(changedProps) {
Expand Down Expand Up @@ -56,7 +62,7 @@ class IntegrationsCard extends LitElement {
/>
</td>
<td class="name">
${domainToName(this.hass.localize, domain)}<br />
${domainToName(this.hass.localize, domain, manifest)}<br />
<span class="domain">${domain}</span>
</td>
${!manifest
Expand Down