Compare commits

...
Author SHA1 Message Date
Claude 7ac2d74fea Link the integration page to the integration's settings panel
The Connectivity settings panels, like Zigbee and Modbus, are not
reachable from the integration page unless the integration has a config
entry. A user that opens the integration page looks for these settings.

The integration page now shows a button that opens the panel of the
integration. The button uses the panel name from the Connectivity page.
LoRaWAN, Modbus, Radio frequency, and USB (Serial) are added to the map
of integrations with a panel.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EzDS5Gc7EVw1NsLpEB7yza
2026-10-30 17:23:54 +00:00
3 changed files with 42 additions and 1 deletions

No files matched your search

+4
View File
@@ -14,10 +14,14 @@ export const integrationsWithPanel = {
bluetooth: "config/bluetooth",
dhcp: "config/dhcp",
infrared: "config/infrared",
lorawan: "config/lorawan",
matter: "config/matter",
modbus: "config/modbus",
mqtt: "config/mqtt",
radio_frequency: "config/radio-frequency",
ssdp: "config/ssdp",
thread: "config/thread",
usb: "config/serial",
zeroconf: "config/zeroconf",
zha: "config/zha/dashboard",
zwave_js: "config/zwave_js/dashboard",
@@ -17,6 +17,7 @@ import { LitElement, css, html, nothing } from "lit";
import { customElement, property, queryAll, state } from "lit/decorators";
import { until } from "lit/directives/until";
import memoizeOne from "memoize-one";
import { ensureArray } from "../../../common/array/ensure-array";
import { isComponentLoaded } from "../../../common/config/is_component_loaded";
import { QueryParamsController } from "../../../common/controllers/query-params-controller";
import type { HASSDomTargetEvent } from "../../../common/dom/fire_event";
@@ -65,6 +66,7 @@ import {
LogSeverity,
domainToName,
fetchIntegrationManifest,
getConfigPanelPath,
integrationIssuesUrl,
setIntegrationLogLevel,
subscribeLogInfo,
@@ -82,6 +84,7 @@ import type { HomeAssistant } from "../../../types";
import { brandsUrl } from "../../../util/brands-url";
import { documentationUrl } from "../../../util/documentation-url";
import { fileDownload } from "../../../util/file_download";
import { configSections } from "../config-sections";
import "./ha-config-entry-row";
import type { HaConfigEntryRow } from "./ha-config-entry-row";
import type { DataEntryFlowProgressExtended } from "./ha-config-integrations";
@@ -396,6 +399,10 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
this.domain
);
const configPanel = isComponentLoaded(this.hass.config, this.domain)
? getConfigPanelPath(this.domain, this.hass.panels)
: undefined;
const documentationLink = this._manifest?.is_built_in
? documentationUrl(this.hass, `/integrations/${this._manifest.domain}`)
: this._manifest?.documentation;
@@ -689,6 +696,21 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
</div>
</div>
<div class="actions">
${
configPanel
? html`<ha-button
appearance="outlined"
href=${`/${configPanel}`}
>
${this.hass.localize(
"ui.panel.config.integrations.integration_page.open_config_panel",
{
name: this._configPanelName(this.domain, configPanel),
}
)}
</ha-button>`
: nothing
}
${
canAddDevice
? html`
@@ -1388,6 +1410,20 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
}
);
private _configPanelName(domain: string, configPanel: string): string {
// Use the name the Connectivity page shows, like "Zigbee" for ZHA.
const page = configSections.connectivity.find(
(section) =>
ensureArray(section.component)?.includes(domain) ||
section.path === `/${configPanel}`
);
return page
? this.hass.localize(
`ui.panel.config.dashboard.${page.translationKey}.main`
)
: domainToName(this.hass.localize, domain, this._manifest);
}
private _addDevice() {
protocolIntegrationPicked(this, this.hass, this.domain);
}
+2 -1
View File
@@ -7818,7 +7818,8 @@
"add_hardware": "Add hardware",
"add_entity": "[%key:ui::panel::config::integrations::integration_page::add_entry%]",
"add_system": "[%key:ui::panel::config::integrations::integration_page::add_entry%]",
"add_virtual": "[%key:ui::panel::config::integrations::integration_page::add_entry%]"
"add_virtual": "[%key:ui::panel::config::integrations::integration_page::add_entry%]",
"open_config_panel": "{name} settings"
},
"config_entry": {
"application_credentials": {