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:
parent
913f7a2aa1
commit
e10c35f340
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user