1
0
mirror of https://github.com/beestat/app.git synced 2025-05-24 02:14:03 -04:00

Removed leading hours in TTT if it's 0

This commit is contained in:
Jon Ziebell 2021-02-20 22:17:59 -05:00
parent 4bdb0d5c22
commit 0bed3a39c5

View File

@ -360,12 +360,14 @@ beestat.component.card.system.prototype.decorate_time_to_temperature_ = function
case 'heat':
degrees_to_go = thermostat.setpoint_heat - indoor_temperature;
hours_to_go = degrees_to_go / degrees_per_hour;
text = beestat.time(hours_to_go * 60 * 60);
text = beestat.time(hours_to_go * 60 * 60)
.replace(/^0h /, '');
break;
case 'cool':
degrees_to_go = indoor_temperature - thermostat.setpoint_cool;
hours_to_go = degrees_to_go / degrees_per_hour;
text = beestat.time(hours_to_go * 60 * 60);
text = beestat.time(hours_to_go * 60 * 60)
.replace(/^0h /, '');
break;
}