some bugfixes

This commit is contained in:
Ziver Koc 2023-09-28 22:08:35 +02:00
parent 7ea6f8b3e4
commit ec4cbc1e7c
2 changed files with 3 additions and 2 deletions

View file

@ -53,13 +53,14 @@
// Update Cells
if (row.dataset.deviceId != deviceData.id || row.cells[3].innerHTML != deviceData.data?.timestamp) {
if (row.dataset.deviceId != deviceData.id || row.dataset.timestamp != deviceData.data?.timestamp) {
// Only update if data has changed
row.dataset.deviceId = deviceData.id;
row.cells[0].innerHTML = deviceData.name;
row.cells[1].innerHTML = deviceData.config?.typeConfig;
row.cells[2].innerHTML = deviceData.data?.valueStr;
row.dataset.timestamp = deviceData.data?.timestamp;
row.cells[3].innerHTML = deviceData.data?.timestamp;
$(row.cells[3]).relTimestamp();

View file

@ -70,7 +70,7 @@ public class ZigbeeColorConfig extends ZigbeeHalEventDeviceConfig implements Hal
return null;
float[] cieXYZ = ((ColorEventData) data).getCieXYZ();
return new MoveToColorCommand((int) cieXYZ[0], (int) cieXYZ[1], 1);
return new MoveToColorCommand((int) (cieXYZ[0] * 65536), (int) (cieXYZ[2] * 65536), 1);
}
// --------------------------