1
0
mirror of https://github.com/beestat/app.git synced 2025-07-09 03:04:07 -04:00

Revert "Fixed #385 - Thermosat Summary sync progress gets stuck if less than one day of history"

This reverts commit b7535a2959710af825d8479c9f33cdbd36db4b45.
This commit is contained in:
Jon Ziebell 2023-01-26 19:38:00 -05:00
parent b7535a2959
commit 938b024f36

View File

@ -25,8 +25,8 @@ beestat.thermostat.get_sync_progress = function(thermostat_id) {
return null;
}
var denominator = required_sync_end.diff(required_sync_begin, 'minute');
var numerator = current_sync_end.diff(current_sync_begin, 'minute');
var denominator = required_sync_end.diff(required_sync_begin, 'day');
var numerator = current_sync_end.diff(current_sync_begin, 'day');
return Math.min(100, Math.round(numerator / denominator * 100)) || 0;
};