mirror of
https://github.com/beestat/app.git
synced 2025-06-03 05:36:51 -04:00
Fixed #158 - Runtime Summary - Temperature units are correct but values are in °F
Forgot about temperature extremes.
This commit is contained in:
parent
382e899a33
commit
e6600fecac
@ -379,16 +379,22 @@ beestat.component.card.runtime_thermostat_summary.prototype.get_buckets_combined
|
|||||||
bucket[key] = sum / bucket[key].length;
|
bucket[key] = sum / bucket[key].length;
|
||||||
|
|
||||||
if (key.substring(key.length - 11) === 'temperature') {
|
if (key.substring(key.length - 11) === 'temperature') {
|
||||||
bucket[key] = beestat.temperature(Math.round(bucket[key] * 10) / 10);
|
bucket[key] = beestat.temperature(bucket[key]);
|
||||||
} else {
|
|
||||||
bucket[key] = Math.round(bucket[key]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bucket[key] = Math.round(bucket[key]);
|
||||||
break;
|
break;
|
||||||
case 'min':
|
case 'min':
|
||||||
bucket[key] = Math.min.apply(null, bucket[key]);
|
bucket[key] = Math.min.apply(null, bucket[key]);
|
||||||
|
if (key.substring(key.length - 11) === 'temperature') {
|
||||||
|
bucket[key] = beestat.temperature(bucket[key]);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'max':
|
case 'max':
|
||||||
bucket[key] = Math.max.apply(null, bucket[key]);
|
bucket[key] = Math.max.apply(null, bucket[key]);
|
||||||
|
if (key.substring(key.length - 11) === 'temperature') {
|
||||||
|
bucket[key] = beestat.temperature(bucket[key]);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'sum':
|
case 'sum':
|
||||||
bucket[key] = bucket[key].reduce(function(accumulator, current_value) {
|
bucket[key] = bucket[key].reduce(function(accumulator, current_value) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user