mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-25 13:57:21 +00:00
Correct ZHA LQI sort in device children dialog (#10616)
This commit is contained in:
parent
3154011c65
commit
4b992fb0c4
@ -34,7 +34,7 @@ export interface ZHADevice {
|
||||
export interface Neighbor {
|
||||
ieee: string;
|
||||
nwk: string;
|
||||
lqi: number;
|
||||
lqi: string;
|
||||
}
|
||||
|
||||
export interface ZHADeviceEndpoint {
|
||||
|
@ -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",
|
||||
},
|
||||
};
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user