Skip to content

Commit

Permalink
Dont attempt to add devices to disabled zwave config (#22461)
Browse files Browse the repository at this point in the history
  • Loading branch information
karwosts authored Oct 22, 2024
1 parent 413171b commit 67ac488
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions src/common/integrations/protocolIntegrationPicked.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ export const protocolIntegrationPicked = async (
if (domain === "zwave_js") {
const entries = options?.config_entry
? undefined
: await getConfigEntries(hass, {
domain,
});
: (
await getConfigEntries(hass, {
domain,
})
).filter((e) => !e.disabled_by);

if (
!isComponentLoaded(hass, "zwave_js") ||
Expand Down Expand Up @@ -81,9 +83,11 @@ export const protocolIntegrationPicked = async (
} else if (domain === "zha") {
const entries = options?.config_entry
? undefined
: await getConfigEntries(hass, {
domain,
});
: (
await getConfigEntries(hass, {
domain,
})
).filter((e) => !e.disabled_by);

if (
!isComponentLoaded(hass, "zha") ||
Expand Down Expand Up @@ -129,9 +133,11 @@ export const protocolIntegrationPicked = async (
} else if (domain === "matter") {
const entries = options?.config_entry
? undefined
: await getConfigEntries(hass, {
domain,
});
: (
await getConfigEntries(hass, {
domain,
})
).filter((e) => !e.disabled_by);
if (
!isComponentLoaded(hass, domain) ||
(!options?.config_entry && !entries?.length)
Expand Down

0 comments on commit 67ac488

Please sign in to comment.