Dont attempt to add devices to disabled zwave config (#22461)

This commit is contained in:
karwosts 2024-10-22 03:02:29 -07:00 committed by GitHub
parent 413171bb3c
commit 67ac4882f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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") ||
@ -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") ||
@ -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)