From b715237bbf43554ac40b6aa980c75c22250399c4 Mon Sep 17 00:00:00 2001 From: Petar Petrov Date: Thu, 10 Jul 2025 09:23:39 +0300 Subject: [PATCH] styling tweak --- .../zwave_js/zwave_js-network-visualization.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-network-visualization.ts b/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-network-visualization.ts index 5a24cec4b8..444b2eb0a8 100644 --- a/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-network-visualization.ts +++ b/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-network-visualization.ts @@ -106,7 +106,7 @@ export class ZWaveJSNetworkVisualization extends SubscribeMixin(LitElement) { private _tooltipFormatter = (params: TopLevelFormatterParams): string => { const { dataType, data } = params as CallbackDataParams; if (dataType === "edge") { - const { source, target } = data as any; + const { source, target, value } = data as any; const sourceDevice = this._devices[source]; const targetDevice = this._devices[target]; const sourceName = @@ -119,8 +119,8 @@ export class ZWaveJSNetworkVisualization extends SubscribeMixin(LitElement) { if (route?.protocol_data_rate) { tip += `
${this.hass.localize("ui.panel.config.zwave_js.visualization.data_rate")}: ${this.hass.localize(`ui.panel.config.zwave_js.protocol_data_rate.${route.protocol_data_rate}`)}`; } - if (route?.rssi) { - tip += `
RSSI: ${route.rssi}`; + if (value) { + tip += `
RSSI: ${value}`; } return tip; } @@ -255,10 +255,6 @@ export class ZWaveJSNetworkVisualization extends SubscribeMixin(LitElement) { existingLink.lineStyle = { ...existingLink.lineStyle, width: Math.max(existingLink.lineStyle!.width!, width), - color: - route.protocol_data_rate && RSSI > -100 - ? colorVariables["primary-color"] - : existingLink.lineStyle!.color, type: route.protocol_data_rate > 1 ? "solid" @@ -272,7 +268,7 @@ export class ZWaveJSNetworkVisualization extends SubscribeMixin(LitElement) { lineStyle: { width, color: - route.protocol_data_rate && RSSI > -100 + repeater === controllerNode ? colorVariables["primary-color"] : colorVariables["disabled-color"], type: route.protocol_data_rate > 1 ? "solid" : "dotted",