mirror of
https://github.com/beestat/app.git
synced 2025-07-09 03:04:07 -04:00
Added metrics for Aux Heat 1 and 2
This commit is contained in:
parent
c5c53c33b4
commit
172bde425d
@ -936,7 +936,9 @@ class profile extends cora\crud {
|
|||||||
'heat_1' => null,
|
'heat_1' => null,
|
||||||
'heat_2' => null,
|
'heat_2' => null,
|
||||||
'cool_1' => null,
|
'cool_1' => null,
|
||||||
'cool_2' => null
|
'cool_2' => null,
|
||||||
|
'auxiliary_heat_1' => null,
|
||||||
|
'auxiliary_heat_2' => null
|
||||||
],
|
],
|
||||||
'balance_point' => [
|
'balance_point' => [
|
||||||
'heat_1' => null,
|
'heat_1' => null,
|
||||||
@ -1043,6 +1045,12 @@ class profile extends cora\crud {
|
|||||||
if($profile['runtime']['heat_2'] > 0) {
|
if($profile['runtime']['heat_2'] > 0) {
|
||||||
$profile['runtime_per_degree_day']['heat_2'] = round($profile['runtime']['heat_2'] / $profile['degree_days']['heat'], 2);
|
$profile['runtime_per_degree_day']['heat_2'] = round($profile['runtime']['heat_2'] / $profile['degree_days']['heat'], 2);
|
||||||
}
|
}
|
||||||
|
if($profile['runtime']['auxiliary_heat_1'] > 0) {
|
||||||
|
$profile['runtime_per_degree_day']['auxiliary_heat_1'] = round($profile['runtime']['auxiliary_heat_1'] / $profile['degree_days']['heat'], 2);
|
||||||
|
}
|
||||||
|
if($profile['runtime']['auxiliary_heat_2'] > 0) {
|
||||||
|
$profile['runtime_per_degree_day']['auxiliary_heat_2'] = round($profile['runtime']['auxiliary_heat_2'] / $profile['degree_days']['heat'], 2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -418,6 +418,8 @@ class thermostat extends cora\crud {
|
|||||||
'runtime_per_degree_day' => [
|
'runtime_per_degree_day' => [
|
||||||
'heat_1',
|
'heat_1',
|
||||||
'heat_2',
|
'heat_2',
|
||||||
|
'auxiliary_heat_1',
|
||||||
|
'auxiliary_heat_2',
|
||||||
'cool_1',
|
'cool_1',
|
||||||
'cool_2'
|
'cool_2'
|
||||||
],
|
],
|
||||||
@ -447,6 +449,8 @@ class thermostat extends cora\crud {
|
|||||||
$intervals['runtime_per_degree_day'] = [
|
$intervals['runtime_per_degree_day'] = [
|
||||||
'heat_1' => 1,
|
'heat_1' => 1,
|
||||||
'heat_2' => 1,
|
'heat_2' => 1,
|
||||||
|
'auxiliary_heat_1' => 1,
|
||||||
|
'auxiliary_heat_2' => 1,
|
||||||
'cool_1' => 1,
|
'cool_1' => 1,
|
||||||
'cool_2' => 1
|
'cool_2' => 1
|
||||||
];
|
];
|
||||||
|
@ -0,0 +1,22 @@
|
|||||||
|
/**
|
||||||
|
* Runtime / HDD for Auxiliary Heat Stage 1
|
||||||
|
*
|
||||||
|
* @param {number} thermostat_id The thermostat ID.
|
||||||
|
*/
|
||||||
|
beestat.component.metric.runtime_per_degree_day.auxiliary_heat_1 = function(thermostat_id) {
|
||||||
|
this.thermostat_id_ = thermostat_id;
|
||||||
|
|
||||||
|
beestat.component.metric.runtime_per_degree_day.apply(this, arguments);
|
||||||
|
};
|
||||||
|
beestat.extend(beestat.component.metric.runtime_per_degree_day.auxiliary_heat_1, beestat.component.metric.runtime_per_degree_day);
|
||||||
|
|
||||||
|
beestat.component.metric.runtime_per_degree_day.auxiliary_heat_1.prototype.child_metric_name_ = 'auxiliary_heat_1';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the icon of this metric.
|
||||||
|
*
|
||||||
|
* @return {string} The icon of this metric.
|
||||||
|
*/
|
||||||
|
beestat.component.metric.runtime_per_degree_day.auxiliary_heat_1.prototype.get_icon_ = function() {
|
||||||
|
return 'fire';
|
||||||
|
};
|
@ -0,0 +1,22 @@
|
|||||||
|
/**
|
||||||
|
* Runtime / HDD for Auxiliary Heat Stage 2
|
||||||
|
*
|
||||||
|
* @param {number} thermostat_id The thermostat ID.
|
||||||
|
*/
|
||||||
|
beestat.component.metric.runtime_per_degree_day.auxiliary_heat_2 = function(thermostat_id) {
|
||||||
|
this.thermostat_id_ = thermostat_id;
|
||||||
|
|
||||||
|
beestat.component.metric.runtime_per_degree_day.apply(this, arguments);
|
||||||
|
};
|
||||||
|
beestat.extend(beestat.component.metric.runtime_per_degree_day.auxiliary_heat_2, beestat.component.metric.runtime_per_degree_day);
|
||||||
|
|
||||||
|
beestat.component.metric.runtime_per_degree_day.auxiliary_heat_2.prototype.child_metric_name_ = 'auxiliary_heat_2';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the icon of this metric.
|
||||||
|
*
|
||||||
|
* @return {string} The icon of this metric.
|
||||||
|
*/
|
||||||
|
beestat.component.metric.runtime_per_degree_day.auxiliary_heat_2.prototype.get_icon_ = function() {
|
||||||
|
return 'fire';
|
||||||
|
};
|
Loading…
x
Reference in New Issue
Block a user