1
0
mirror of https://github.com/beestat/app.git synced 2025-05-24 02:14:03 -04:00

Fixed series naming for single stage

This commit is contained in:
Jon Ziebell 2021-03-04 20:47:12 -05:00
parent 580bbfd93b
commit c8c8a98250
2 changed files with 34 additions and 31 deletions

View File

@ -120,7 +120,7 @@ beestat.style.hex_to_rgb = function(hex) {
beestat.series = {};
beestat.series.compressor_heat_1 = {
'name': 'Heat 1',
'name': 'Heat',
'color': beestat.style.color.orange.light
};
@ -140,7 +140,7 @@ beestat.series.auxiliary_heat_2 = {
};
beestat.series.compressor_cool_1 = {
'name': 'Cool 1',
'name': 'Cool',
'color': beestat.style.color.lightblue.light
};
@ -220,6 +220,7 @@ beestat.series.avg_indoor_temperature = beestat.series.indoor_temperature;
beestat.series.avg_outdoor_temperature = beestat.series.outdoor_temperature;
beestat.series.avg_indoor_humidity = beestat.series.indoor_humidity;
beestat.series.avg_outdoor_humidity = beestat.series.outdoor_humidity;
beestat.series.extreme_outdoor_temperature = {
'name': 'Outdoor Temp Extremes',
'color': beestat.style.color.gray.dark
@ -280,52 +281,45 @@ beestat.series.calendar_event_custom = {
'color': beestat.style.color.bluegreen.base
};
// Temperature Profiles
beestat.series.indoor_heat_delta = {
'name': 'Indoor Heat Δ',
'color': beestat.series.compressor_heat_1.color
};
beestat.series.indoor_heat_delta_raw = beestat.series.indoor_heat_delta;
beestat.series.indoor_cool_delta = {
'name': 'Indoor Cool Δ',
'color': beestat.series.compressor_cool_1.color
};
beestat.series.indoor_cool_delta_raw = beestat.series.indoor_cool_delta;
beestat.series.indoor_resist_delta = {
'name': 'Indoor Δ',
'color': beestat.style.color.gray.dark
};
beestat.series.indoor_resist_delta_raw = beestat.series.indoor_resist_delta;
// Temperature Profiles New
beestat.series.indoor_heat_1_delta = {
'name': 'Indoor Heat 1 Δ',
'name': 'Heat Δ',
'color': beestat.series.compressor_heat_1.color
};
beestat.series.indoor_heat_1_delta_raw = beestat.series.indoor_heat_1_delta;
beestat.series.indoor_heat_2_delta = {
'name': 'Indoor Heat 2 Δ',
'name': 'Heat 2 Δ',
'color': beestat.series.compressor_heat_2.color
};
beestat.series.indoor_heat_2_delta_raw = beestat.series.indoor_heat_2_delta;
beestat.series.indoor_auxiliary_heat_1_delta = {
'name': 'Aux Heat Δ',
'color': beestat.series.auxiliary_heat_1.color
};
beestat.series.indoor_auxiliary_heat_1_delta_raw = beestat.series.indoor_auxiliary_heat_1_delta;
beestat.series.indoor_auxiliary_heat_2_delta = {
'name': 'Aux Heat 2 Δ',
'color': beestat.series.auxiliary_heat_2.color
};
beestat.series.indoor_auxiliary_heat_2_delta_raw = beestat.series.indoor_auxiliary_heat_2_delta;
beestat.series.indoor_cool_1_delta = {
'name': 'Indoor Cool 1 Δ',
'name': 'Cool Δ',
'color': beestat.series.compressor_cool_1.color
};
beestat.series.indoor_cool_1_delta_raw = beestat.series.indoor_cool_1_delta;
beestat.series.indoor_cool_2_delta = {
'name': 'Indoor Cool 2 Δ',
'name': 'Cool 2 Δ',
'color': beestat.series.compressor_cool_2.color
};
beestat.series.indoor_cool_2_delta_raw = beestat.series.indoor_cool_2_delta;
beestat.series.indoor_resist_delta = {
'name': 'Indoor Δ',
'name': 'Resist Δ',
'color': beestat.style.color.gray.dark
};
beestat.series.indoor_resist_delta_raw = beestat.series.indoor_resist_delta;

View File

@ -165,12 +165,21 @@ beestat.layer.load.prototype.decorate_ = function(parent) {
// Set the active temperature unit.
beestat.setting('temperature_unit', thermostat.temperature_unit);
// Rename series if only one stage is available.
if (beestat.thermostat.get_stages(thermostat.thermostat_id, 'cool') === 1) {
beestat.series.sum_compressor_cool_1.name = 'Cool';
// Rename series if there are multiple stages.
if (beestat.thermostat.get_stages(thermostat.thermostat_id, 'heat') > 1) {
beestat.series.compressor_heat_1.name = 'Heat 1';
beestat.series.sum_compressor_heat_1.name = 'Heat 1';
beestat.series.indoor_heat_1_delta.name = 'Heat 1 Δ';
}
if (beestat.thermostat.get_stages(thermostat.thermostat_id, 'heat') === 1) {
beestat.series.sum_compressor_heat_1.name = 'Heat';
if (beestat.thermostat.get_stages(thermostat.thermostat_id, 'auxiliary_heat') > 1) {
beestat.series.auxiliary_heat_1.name = 'Aux Heat 1';
beestat.series.sum_auxiliary_heat_1.name = 'Aux Heat 1';
beestat.series.indoor_auxiliary_heat_1_delta.name = 'Aux Heat 1 Δ';
}
if (beestat.thermostat.get_stages(thermostat.thermostat_id, 'cool') > 1) {
beestat.series.compressor_cool_1.name = 'Cool 1';
beestat.series.sum_compressor_cool_1.name = 'Cool 1';
beestat.series.indoor_cool_1_delta.name = 'Cool 1 Δ';
}
// Fix some other stuff for non-heat-pump.