mirror of
https://github.com/beestat/app.git
synced 2025-05-24 02:14:03 -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;
|
||||
|
||||
if (key.substring(key.length - 11) === 'temperature') {
|
||||
bucket[key] = beestat.temperature(Math.round(bucket[key] * 10) / 10);
|
||||
} else {
|
||||
bucket[key] = Math.round(bucket[key]);
|
||||
bucket[key] = beestat.temperature(bucket[key]);
|
||||
}
|
||||
|
||||
bucket[key] = Math.round(bucket[key]);
|
||||
break;
|
||||
case 'min':
|
||||
bucket[key] = Math.min.apply(null, bucket[key]);
|
||||
if (key.substring(key.length - 11) === 'temperature') {
|
||||
bucket[key] = beestat.temperature(bucket[key]);
|
||||
}
|
||||
break;
|
||||
case 'max':
|
||||
bucket[key] = Math.max.apply(null, bucket[key]);
|
||||
if (key.substring(key.length - 11) === 'temperature') {
|
||||
bucket[key] = beestat.temperature(bucket[key]);
|
||||
}
|
||||
break;
|
||||
case 'sum':
|
||||
bucket[key] = bucket[key].reduce(function(accumulator, current_value) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user