diff --git a/src/data/zha.ts b/src/data/zha.ts index b8c99e0e24..d1b6f2ab97 100644 --- a/src/data/zha.ts +++ b/src/data/zha.ts @@ -34,7 +34,7 @@ export interface ZHADevice { export interface Neighbor { ieee: string; nwk: string; - lqi: number; + lqi: string; } export interface ZHADeviceEndpoint { diff --git a/src/panels/config/integrations/integration-panels/zha/dialog-zha-device-children.ts b/src/panels/config/integrations/integration-panels/zha/dialog-zha-device-children.ts index 032ee83778..91bd86246c 100644 --- a/src/panels/config/integrations/integration-panels/zha/dialog-zha-device-children.ts +++ b/src/panels/config/integrations/integration-panels/zha/dialog-zha-device-children.ts @@ -43,7 +43,7 @@ class DialogZHADeviceChildren extends LitElement { outputDevices.push({ name: zhaDevice.user_given_name || zhaDevice.name, id: zhaDevice.device_reg_id, - lqi: child.lqi, + lqi: parseInt(child.lqi), }); } }); @@ -64,7 +64,7 @@ class DialogZHADeviceChildren extends LitElement { title: "LQI", sortable: true, filterable: true, - direction: "asc", + type: "numeric", width: "75px", }, }; 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 8403cac13b..f635d6232a 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 @@ -233,11 +233,11 @@ export class ZHANetworkVisualizationPage extends LitElement { from: device.ieee, to: neighbor.ieee, label: neighbor.lqi + "", - color: this._getLQI(neighbor.lqi), + color: this._getLQI(parseInt(neighbor.lqi)), }); } else { edges[idx].color = this._getLQI( - (parseInt(edges[idx].label!) + neighbor.lqi) / 2 + (parseInt(edges[idx].label!) + parseInt(neighbor.lqi)) / 2 ); edges[idx].label += "/" + neighbor.lqi; }