diff --git a/src/panels/config/integrations/integration-panels/zha/zha-network-visualization-page.ts b/src/panels/config/integrations/integration-panels/zha/zha-network-visualization-page.ts index 5283ae348fbe..f3aa9d96db37 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-network-visualization-page.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-network-visualization-page.ts @@ -10,6 +10,7 @@ import "../../../../../components/device/ha-device-picker"; import "../../../../../components/ha-button-menu"; import "../../../../../components/ha-checkbox"; import type { HaCheckbox } from "../../../../../components/ha-checkbox"; +import "../../../../../components/ha-circular-progress"; import "../../../../../components/ha-formfield"; import type { DeviceRegistryEntry } from "../../../../../data/device_registry"; import type { ZHADevice } from "../../../../../data/zha"; @@ -61,6 +62,9 @@ export class ZHANetworkVisualizationPage extends LitElement { private _enablePhysics = true; + @state() + private _refreshingTopology = false; + protected firstUpdated(changedProperties: PropertyValues): void { super.firstUpdated(changedProperties); @@ -202,7 +206,16 @@ export class ZHANetworkVisualizationPage extends LitElement { > - + + ${this._refreshingTopology + ? html`` + : ""} ${this.hass!.localize( "ui.panel.config.zha.visualization.refresh_topology" )} @@ -392,7 +405,13 @@ export class ZHANetworkVisualizationPage extends LitElement { } private async _refreshTopology(): Promise { - await refreshTopology(this.hass); + this._refreshingTopology = true; + try { + await refreshTopology(this.hass); + await this._fetchData(); + } finally { + this._refreshingTopology = false; + } } private _filterDevices = (device: DeviceRegistryEntry): boolean => {