1
0
mirror of https://github.com/beestat/app.git synced 2025-08-11 09:13:50 -04:00

Fixed time to cool calculation wrong.

This commit is contained in:
Jon Ziebell 2021-04-06 20:27:04 -04:00
parent 76ff07c32a
commit bfd98905d8

View File

@ -375,7 +375,7 @@ beestat.component.card.system.prototype.decorate_time_to_temperature_ = function
}) +
' / h)';
if (degrees_per_hour < 0.05) {
if (Math.abs(degrees_per_hour) < 0.05) {
// If the degrees would display as 0.0/h, go for "never" as the time.
text = 'Never';
} else {
@ -390,7 +390,7 @@ beestat.component.card.system.prototype.decorate_time_to_temperature_ = function
break;
case 'cool':
degrees_to_go = indoor_temperature - thermostat.setpoint_cool;
hours_to_go = degrees_to_go / degrees_per_hour;
hours_to_go = degrees_to_go / degrees_per_hour * -1;
text = beestat.time(hours_to_go * 60 * 60)
.replace(/^0h /, '');
break;