mirror of
https://github.com/beestat/app.git
synced 2025-07-09 03:04:07 -04:00
Fixed #196 - Runtime Detail is showing °F data even though the units show °C
Forgot to account for this on all of the series.
This commit is contained in:
parent
f0a8f24b59
commit
58a22f009b
@ -15,8 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
// beestat.temperature = function(temperature, convert, round, include_units) {
|
// beestat.temperature = function(temperature, convert, round, include_units) {
|
||||||
beestat.temperature = function(args) {
|
beestat.temperature = function(args) {
|
||||||
var thermostat = beestat.cache.thermostat[beestat.setting('thermostat_id')];
|
|
||||||
|
|
||||||
// Allow passing a single argument of temperature for convenience.
|
// Allow passing a single argument of temperature for convenience.
|
||||||
if (typeof args !== 'object' || args === null) {
|
if (typeof args !== 'object' || args === null) {
|
||||||
args = {
|
args = {
|
||||||
@ -38,7 +36,7 @@ beestat.temperature = function(args) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Convert to Celcius if necessary and asked for.
|
// Convert to Celcius if necessary and asked for.
|
||||||
if (convert === true && thermostat.temperature_unit === '°C') {
|
if (convert === true && beestat.setting('temperature_unit') === '°C') {
|
||||||
if (delta === true) {
|
if (delta === true) {
|
||||||
temperature *= (5 / 9);
|
temperature *= (5 / 9);
|
||||||
} else {
|
} else {
|
||||||
@ -65,7 +63,7 @@ beestat.temperature = function(args) {
|
|||||||
|
|
||||||
// Append units if asked for.
|
// Append units if asked for.
|
||||||
if (units === true) {
|
if (units === true) {
|
||||||
temperature += thermostat.temperature_unit;
|
temperature += beestat.setting('temperature_unit');
|
||||||
}
|
}
|
||||||
|
|
||||||
return temperature;
|
return temperature;
|
||||||
|
@ -434,12 +434,16 @@ beestat.component.card.runtime_detail.prototype.get_data_ = function() {
|
|||||||
data.series.outdoor_humidity.push(outdoor_humidity_moving);
|
data.series.outdoor_humidity.push(outdoor_humidity_moving);
|
||||||
data.metadata.series.outdoor_humidity.active = true;
|
data.metadata.series.outdoor_humidity.active = true;
|
||||||
|
|
||||||
var indoor_temperature_moving = this.get_average_(moving, 'indoor_temperature');
|
var indoor_temperature_moving = beestat.temperature(
|
||||||
|
this.get_average_(moving, 'indoor_temperature')
|
||||||
|
);
|
||||||
data.series.indoor_temperature.push(indoor_temperature_moving);
|
data.series.indoor_temperature.push(indoor_temperature_moving);
|
||||||
y_min_max(indoor_temperature_moving);
|
y_min_max(indoor_temperature_moving);
|
||||||
data.metadata.series.indoor_temperature.active = true;
|
data.metadata.series.indoor_temperature.active = true;
|
||||||
|
|
||||||
var outdoor_temperature_moving = this.get_average_(moving, 'outdoor_temperature');
|
var outdoor_temperature_moving = beestat.temperature(
|
||||||
|
this.get_average_(moving, 'outdoor_temperature')
|
||||||
|
);
|
||||||
data.series.outdoor_temperature.push(outdoor_temperature_moving);
|
data.series.outdoor_temperature.push(outdoor_temperature_moving);
|
||||||
y_min_max(outdoor_temperature_moving);
|
y_min_max(outdoor_temperature_moving);
|
||||||
data.metadata.series.outdoor_temperature.active = true;
|
data.metadata.series.outdoor_temperature.active = true;
|
||||||
@ -453,13 +457,14 @@ beestat.component.card.runtime_detail.prototype.get_data_ = function() {
|
|||||||
runtime_thermostat.system_mode === 'heat' ||
|
runtime_thermostat.system_mode === 'heat' ||
|
||||||
runtime_thermostat.system_mode === 'auxiliary_heat'
|
runtime_thermostat.system_mode === 'auxiliary_heat'
|
||||||
) {
|
) {
|
||||||
data.series.setpoint_heat.push(
|
var setpoint_heat = beestat.temperature(
|
||||||
beestat.temperature(runtime_thermostat.setpoint_heat)
|
runtime_thermostat.setpoint_heat
|
||||||
);
|
);
|
||||||
|
data.series.setpoint_heat.push(setpoint_heat);
|
||||||
|
y_min_max(setpoint_heat);
|
||||||
|
|
||||||
data.metadata.series.setpoint_heat.active = true;
|
data.metadata.series.setpoint_heat.active = true;
|
||||||
|
|
||||||
y_min_max(runtime_thermostat.setpoint_heat);
|
|
||||||
} else {
|
} else {
|
||||||
data.series.setpoint_heat.push(null);
|
data.series.setpoint_heat.push(null);
|
||||||
}
|
}
|
||||||
@ -468,13 +473,14 @@ beestat.component.card.runtime_detail.prototype.get_data_ = function() {
|
|||||||
runtime_thermostat.system_mode === 'auto' ||
|
runtime_thermostat.system_mode === 'auto' ||
|
||||||
runtime_thermostat.system_mode === 'cool'
|
runtime_thermostat.system_mode === 'cool'
|
||||||
) {
|
) {
|
||||||
data.series.setpoint_cool.push(
|
var setpoint_cool = beestat.temperature(
|
||||||
beestat.temperature(runtime_thermostat.setpoint_cool)
|
runtime_thermostat.setpoint_cool
|
||||||
);
|
);
|
||||||
|
data.series.setpoint_cool.push(setpoint_cool);
|
||||||
|
y_min_max(setpoint_cool);
|
||||||
|
|
||||||
data.metadata.series.setpoint_cool.active = true;
|
data.metadata.series.setpoint_cool.active = true;
|
||||||
|
|
||||||
y_min_max(runtime_thermostat.setpoint_cool);
|
|
||||||
} else {
|
} else {
|
||||||
data.series.setpoint_cool.push(null);
|
data.series.setpoint_cool.push(null);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user