diff --git a/js/component/card/runtime_detail.js b/js/component/card/runtime_detail.js index 822d310..b81a578 100644 --- a/js/component/card/runtime_detail.js +++ b/js/component/card/runtime_detail.js @@ -72,11 +72,18 @@ beestat.component.card.runtime_detail.prototype.decorate_contents_ = function(pa ); } + // Don't go before there's data. required_begin = moment.max( required_begin, moment(thermostat.first_connected) ); + // Don't go after now. + required_end = moment.min( + required_end, + moment().subtract(1, 'hour') + ); + /** * If the needed data exists in the database and the runtime_thermostat * cache is empty, then query the data. If the needed data does not exist in