From 3a20c951c6c0526e8736c4592323d3960743fd9f Mon Sep 17 00:00:00 2001 From: Jon Ziebell Date: Tue, 13 Sep 2022 22:30:33 -0400 Subject: [PATCH] Fixed visualizer not caching "7 Day Average" response --- js/component/card/three_d.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/js/component/card/three_d.js b/js/component/card/three_d.js index 057e311..4e23d9a 100644 --- a/js/component/card/three_d.js +++ b/js/component/card/three_d.js @@ -176,8 +176,17 @@ beestat.component.card.three_d.prototype.decorate_contents_ = function(parent) { .subtract( beestat.setting('visualize.range_dynamic'), 'day' - ); - required_end = moment(); + ) + .hour(0) + .minute(0) + .second(0); + + required_end = moment() + .subtract(1, 'day') + .clone() + .hour(23) + .minute(59) + .second(59); } } else { required_begin = moment(