mirror of
https://github.com/beestat/app.git
synced 2025-07-09 03:04:07 -04:00
Updated a few things to support merged thermostats.
This commit is contained in:
parent
c970cc85c9
commit
bded3a278b
@ -10,8 +10,7 @@ class runtime_thermostat_summary extends cora\crud {
|
||||
public static $exposed = [
|
||||
'private' => [
|
||||
'read_id',
|
||||
'sync',
|
||||
'populate_backwards'
|
||||
'sync'
|
||||
],
|
||||
'public' => []
|
||||
];
|
||||
|
@ -116,7 +116,7 @@ beestat.component.card.air_quality_detail.prototype.decorate_contents_ = functio
|
||||
// Don't go before there's data.
|
||||
required_begin = moment.max(
|
||||
required_begin,
|
||||
moment.utc(thermostat.first_connected)
|
||||
moment.utc(thermostat.data_begin)
|
||||
);
|
||||
|
||||
// Don't go after now.
|
||||
|
@ -116,7 +116,7 @@ beestat.component.card.runtime_sensor_detail.prototype.decorate_contents_ = func
|
||||
// Don't go before there's data.
|
||||
required_begin = moment.max(
|
||||
required_begin,
|
||||
moment.utc(thermostat.first_connected)
|
||||
moment.utc(thermostat.data_begin)
|
||||
);
|
||||
|
||||
// Don't go after now.
|
||||
|
@ -135,7 +135,7 @@ beestat.component.card.runtime_thermostat_detail.prototype.decorate_contents_ =
|
||||
// Don't go before there's data.
|
||||
required_begin = moment.max(
|
||||
required_begin,
|
||||
moment.utc(thermostat.first_connected)
|
||||
moment.utc(thermostat.data_begin)
|
||||
);
|
||||
|
||||
// Don't go after now.
|
||||
|
@ -182,7 +182,7 @@ beestat.component.card.runtime_thermostat_summary.prototype.get_data_ = function
|
||||
var begin_m;
|
||||
if (beestat.setting('runtime_thermostat_summary_time_period') === 'all') {
|
||||
begin_m = moment(
|
||||
beestat.cache.thermostat[this.thermostat_id_].first_connected
|
||||
beestat.cache.thermostat[this.thermostat_id_].data_begin
|
||||
);
|
||||
} else {
|
||||
var time_periods = [
|
||||
|
@ -82,7 +82,7 @@ beestat.component.card.voc_summary.prototype.decorate_contents_ = function(paren
|
||||
// Don't go before there's data.
|
||||
required_begin = moment.max(
|
||||
required_begin,
|
||||
moment.utc(thermostat.first_connected)
|
||||
moment.utc(thermostat.data_begin)
|
||||
);
|
||||
|
||||
// Don't go after now.
|
||||
|
@ -175,7 +175,7 @@ beestat.component.modal.download_data.prototype.decorate_presets_ = function(par
|
||||
},
|
||||
{
|
||||
'label': 'All Time',
|
||||
'range_begin': moment.max(moment(thermostat.first_connected), now.clone().subtract(1, 'year')),
|
||||
'range_begin': moment.max(moment(thermostat.data_begin), now.clone().subtract(1, 'year')),
|
||||
'range_end': now.clone(),
|
||||
'button': new beestat.component.button()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user