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

Fixed #376 - Static times can sometimes end up in the past and cause a range error

This commit is contained in:
Jon Ziebell 2022-11-29 21:40:21 -05:00
parent 913f7a2aa1
commit e10c35f340
4 changed files with 20 additions and 0 deletions

View File

@ -121,6 +121,11 @@ beestat.component.card.air_quality_detail.prototype.decorate_contents_ = functio
moment().subtract(1, 'hour')
);
required_end = moment.max(
required_end,
moment(thermostat.data_begin)
);
/**
* If the needed data exists in the database and the runtime_sensor
* cache is empty, then query the data. If the needed data does not exist in

View File

@ -91,6 +91,11 @@ beestat.component.card.air_quality_summary.prototype.decorate_contents_ = functi
moment().subtract(1, 'hour')
);
required_end = moment.max(
required_end,
moment(thermostat.data_begin)
);
/**
* If the needed data exists in the database and the runtime_sensor
* cache is empty, then query the data. If the needed data does not exist in

View File

@ -123,6 +123,11 @@ beestat.component.card.runtime_sensor_detail.prototype.decorate_contents_ = func
moment().subtract(1, 'hour')
);
required_end = moment.max(
required_end,
moment(thermostat.data_begin)
);
/**
* If the needed data exists in the database and the runtime_sensor cache is
* empty, then query the data. If the needed data does not exist in the

View File

@ -142,6 +142,11 @@ beestat.component.card.runtime_thermostat_detail.prototype.decorate_contents_ =
moment().subtract(1, 'hour')
);
required_end = moment.max(
required_end,
moment(thermostat.data_begin)
);
/**
* 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