From 0bed3a39c5d4349133e362093ee1b1667d7b3374 Mon Sep 17 00:00:00 2001 From: Jon Ziebell Date: Sat, 20 Feb 2021 22:17:59 -0500 Subject: [PATCH] Removed leading hours in TTT if it's 0 --- js/component/card/system.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/component/card/system.js b/js/component/card/system.js index b74bc2a..7ac21a2 100644 --- a/js/component/card/system.js +++ b/js/component/card/system.js @@ -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; }