diff --git a/src/data/zha.ts b/src/data/zha.ts index c0382b00db..b3f7b084a7 100644 --- a/src/data/zha.ts +++ b/src/data/zha.ts @@ -169,9 +169,16 @@ export interface ZHANetworkBackup { node_info: ZHANetworkBackupNodeInfo; } +export interface ZHADeviceSettings { + path: string; + baudrate?: number; + flow_control?: string; +} + export interface ZHANetworkSettings { settings: ZHANetworkBackup; radio_type: "ezsp" | "znp" | "deconz" | "zigate" | "xbee"; + device: ZHADeviceSettings; } export interface ZHANetworkBackupAndMetadata { diff --git a/src/panels/config/integrations/integration-panels/zha/zha-config-dashboard.ts b/src/panels/config/integrations/integration-panels/zha/zha-config-dashboard.ts index 7176894b84..0518935fca 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-config-dashboard.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-config-dashboard.ts @@ -46,6 +46,8 @@ import { } from "../../../../../data/zha"; import { showAlertDialog } from "../../../../../dialogs/generic/show-dialog-box"; +const MULTIPROTOCOL_ADDON_URL = "socket://core-silabs-multiprotocol:9999"; + export const zhaTabs: PageNavigation[] = [ { translationKey: "ui.panel.config.zha.network.caption", @@ -181,6 +183,25 @@ class ZHAConfigDashboard extends LitElement { >${this._networkSettings.radio_type} + + + Serial port + ${this._networkSettings.device.path} + + + ${this._networkSettings.device.baudrate && + !this._networkSettings.device.path.startsWith("socket://") + ? html` + + Baudrate + ${this._networkSettings.device.baudrate} + + ` + : ""} ` : ""}
@@ -255,6 +276,19 @@ class ZHAConfigDashboard extends LitElement { } private async _showChannelMigrationDialog(): Promise { + if (this._networkSettings!.device.path === MULTIPROTOCOL_ADDON_URL) { + showAlertDialog(this, { + title: this.hass.localize( + "ui.panel.config.zha.configuration_page.channel_dialog.title" + ), + text: this.hass.localize( + "ui.panel.config.zha.configuration_page.channel_dialog.text" + ), + warning: true, + }); + return; + } + showZHAChangeChannelDialog(this, { currentChannel: this._networkSettings!.settings.network_info.channel, }); diff --git a/src/translations/en.json b/src/translations/en.json index c8fb2ba4fe..076091255e 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -3509,7 +3509,11 @@ "download_backup": "Download Backup", "migrate_radio": "Migrate Radio", "network_settings_title": "Network Settings", - "change_channel": "Change channel" + "change_channel": "Change channel", + "channel_dialog": { + "title": "Multiprotocol addon in use", + "text": "Zigbee and Thread share the same radio and must use the same channel. Change the channel of both networks by reconfiguring multiprotocol from the hardware menu." + } }, "add_device_page": { "spinner": "Searching for Zigbee devices…",