From 2ab9aed5b426e70c39d3a99fc29111c7310fb9d5 Mon Sep 17 00:00:00 2001
From: Wendelin <12148533+wendevlin@users.noreply.github.com>
Date: Mon, 21 Oct 2024 15:55:17 +0200
Subject: [PATCH] Fix integration configure on failed setup (#22407)
* Fix integration configure button when setup failed
* Use ha-button instead of mwc-button in ha-config-integration-page
---
.../ha-config-integration-page.ts | 26 +++++++------------
1 file changed, 10 insertions(+), 16 deletions(-)
diff --git a/src/panels/config/integrations/ha-config-integration-page.ts b/src/panels/config/integrations/ha-config-integration-page.ts
index 9ec4756eff..7eff25cc88 100644
--- a/src/panels/config/integrations/ha-config-integration-page.ts
+++ b/src/panels/config/integrations/ha-config-integration-page.ts
@@ -774,27 +774,29 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
: ""}
${item.disabled_by === "user"
- ? html`
+ ? html`
${this.hass.localize("ui.common.enable")}
- `
+ `
: configPanel &&
- (item.domain !== "matter" || isDevVersion(this.hass.config.version))
+ (item.domain !== "matter" ||
+ isDevVersion(this.hass.config.version)) &&
+ !stateText
? html`
+ >
${this.hass.localize(
"ui.panel.config.integrations.config_entry.configure"
)}
- `
- : item.supports_options && !stateText
+ : item.supports_options
? html`
-
+
${this.hass.localize(
"ui.panel.config.integrations.config_entry.configure"
)}
-
+
`
: ""}
@@ -803,14 +805,6 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
.label=${this.hass.localize("ui.common.menu")}
.path=${mdiDotsVertical}
>
- ${item.supports_options && stateText
- ? html`
-
- ${this.hass.localize(
- "ui.panel.config.integrations.config_entry.configure"
- )}
- `
- : ""}
${item.disabled_by && devices.length
? html`