mirror of
https://github.com/beestat/app.git
synced 2025-06-03 05:36:51 -04:00
Mostly migrated from heat_auxiliary to auxiliary_heat naming convention for #331
This commit is contained in:
parent
808fc3580f
commit
5fffa7686a
@ -228,6 +228,10 @@ class ecobee_thermostat extends cora\crud {
|
|||||||
'equipment' => null,
|
'equipment' => null,
|
||||||
'stages' => null
|
'stages' => null
|
||||||
],
|
],
|
||||||
|
'auxiliary_heat' => [
|
||||||
|
'equipment' => null,
|
||||||
|
'stages' => null
|
||||||
|
],
|
||||||
'cool' => [
|
'cool' => [
|
||||||
'equipment' => null,
|
'equipment' => null,
|
||||||
'stages' => null
|
'stages' => null
|
||||||
@ -568,9 +572,15 @@ class ecobee_thermostat extends cora\crud {
|
|||||||
} else {
|
} else {
|
||||||
$system_type_heat_auxiliary = $system_type['detected']['heat_auxiliary']['equipment'];
|
$system_type_heat_auxiliary = $system_type['detected']['heat_auxiliary']['equipment'];
|
||||||
}
|
}
|
||||||
|
if($system_type['reported']['auxiliary_heat'] !== null) {
|
||||||
|
$system_type_auxiliary_heat = $system_type['reported']['auxiliary_heat']['equipment'];
|
||||||
|
} else {
|
||||||
|
$system_type_auxiliary_heat = $system_type['detected']['auxiliary_heat']['equipment'];
|
||||||
|
}
|
||||||
$has_heat = (
|
$has_heat = (
|
||||||
$system_type_heat !== 'none' ||
|
$system_type_heat !== 'none' ||
|
||||||
$system_type_heat_auxiliary !== 'none'
|
$system_type_heat_auxiliary !== 'none' ||
|
||||||
|
$system_type_auxiliary_heat !== 'none'
|
||||||
);
|
);
|
||||||
|
|
||||||
if($system_type['reported']['cool'] !== null) {
|
if($system_type['reported']['cool'] !== null) {
|
||||||
@ -727,6 +737,20 @@ class ecobee_thermostat extends cora\crud {
|
|||||||
} else if($detected_system_type['heat']['equipment'] === 'compressor') {
|
} else if($detected_system_type['heat']['equipment'] === 'compressor') {
|
||||||
$detected_system_type['heat_auxiliary']['equipment'] = 'electric';
|
$detected_system_type['heat_auxiliary']['equipment'] = 'electric';
|
||||||
}
|
}
|
||||||
|
$detected_system_type['auxiliary_heat'] = [
|
||||||
|
'equipment' => null,
|
||||||
|
'stages' => null
|
||||||
|
];
|
||||||
|
if(
|
||||||
|
$detected_system_type['heat']['equipment'] === 'gas' ||
|
||||||
|
$detected_system_type['heat']['equipment'] === 'boiler' ||
|
||||||
|
$detected_system_type['heat']['equipment'] === 'oil' ||
|
||||||
|
$detected_system_type['heat']['equipment'] === 'electric'
|
||||||
|
) {
|
||||||
|
$detected_system_type['auxiliary_heat']['equipment'] = 'none';
|
||||||
|
} else if($detected_system_type['heat']['equipment'] === 'compressor') {
|
||||||
|
$detected_system_type['auxiliary_heat']['equipment'] = 'electric';
|
||||||
|
}
|
||||||
|
|
||||||
// Cool
|
// Cool
|
||||||
$detected_system_type['cool'] = [
|
$detected_system_type['cool'] = [
|
||||||
|
@ -49,7 +49,7 @@ class thermostat extends cora\crud {
|
|||||||
$generated_columns = [];
|
$generated_columns = [];
|
||||||
|
|
||||||
if(isset($attributes['system_type2']) === true) {
|
if(isset($attributes['system_type2']) === true) {
|
||||||
foreach(['heat', 'heat_auxiliary', 'cool'] as $mode) {
|
foreach(['heat', 'heat_auxiliary', 'auxiliary_heat', 'cool'] as $mode) {
|
||||||
if($attributes['system_type2']['reported'][$mode]['equipment'] !== null) {
|
if($attributes['system_type2']['reported'][$mode]['equipment'] !== null) {
|
||||||
$generated_columns['system_type_' . $mode] = $attributes['system_type2']['reported'][$mode]['equipment'];
|
$generated_columns['system_type_' . $mode] = $attributes['system_type2']['reported'][$mode]['equipment'];
|
||||||
} else {
|
} else {
|
||||||
@ -104,7 +104,7 @@ class thermostat extends cora\crud {
|
|||||||
$thermostat = $this->get($thermostat_id);
|
$thermostat = $this->get($thermostat_id);
|
||||||
|
|
||||||
foreach($system_types as $system_type => $value) {
|
foreach($system_types as $system_type => $value) {
|
||||||
if(in_array($system_type, ['heat', 'heat_auxiliary', 'cool']) === true) {
|
if(in_array($system_type, ['heat', 'heat_auxiliary', 'auxiliary_heat', 'cool']) === true) {
|
||||||
$thermostat['system_type2']['reported'][$system_type]['equipment'] = $value;
|
$thermostat['system_type2']['reported'][$system_type]['equipment'] = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,9 +42,9 @@ beestat.component.card.my_home.prototype.decorate_system_type_ = function(parent
|
|||||||
'heat'
|
'heat'
|
||||||
);
|
);
|
||||||
const heat_stages_string = heat_stages > 1 ? ' (2 Stage)' : '';
|
const heat_stages_string = heat_stages > 1 ? ' (2 Stage)' : '';
|
||||||
const heat_auxiliary = beestat.thermostat.get_system_type(
|
const auxiliary_heat = beestat.thermostat.get_system_type(
|
||||||
thermostat.thermostat_id,
|
thermostat.thermostat_id,
|
||||||
'heat_auxiliary'
|
'auxiliary_heat'
|
||||||
);
|
);
|
||||||
const cool = beestat.thermostat.get_system_type(
|
const cool = beestat.thermostat.get_system_type(
|
||||||
thermostat.thermostat_id,
|
thermostat.thermostat_id,
|
||||||
@ -68,7 +68,7 @@ beestat.component.card.my_home.prototype.decorate_system_type_ = function(parent
|
|||||||
.set_background_color(beestat.series.auxiliary_heat_1.color)
|
.set_background_color(beestat.series.auxiliary_heat_1.color)
|
||||||
.set_text_color('#fff')
|
.set_text_color('#fff')
|
||||||
.set_icon('fire')
|
.set_icon('fire')
|
||||||
.set_text(heat_auxiliary.charAt(0).toUpperCase() + heat_auxiliary.slice(1)));
|
.set_text(auxiliary_heat.charAt(0).toUpperCase() + auxiliary_heat.slice(1)));
|
||||||
button_group.add_button(new beestat.component.button()
|
button_group.add_button(new beestat.component.button()
|
||||||
.set_type('pill')
|
.set_type('pill')
|
||||||
.set_background_color(beestat.series.compressor_cool_1.color)
|
.set_background_color(beestat.series.compressor_cool_1.color)
|
||||||
|
@ -27,7 +27,7 @@ beestat.component.modal.change_system_type.prototype.decorate_contents_ = functi
|
|||||||
'oil',
|
'oil',
|
||||||
'none'
|
'none'
|
||||||
],
|
],
|
||||||
'heat_auxiliary': [
|
'auxiliary_heat': [
|
||||||
'gas',
|
'gas',
|
||||||
'electric',
|
'electric',
|
||||||
'oil',
|
'oil',
|
||||||
@ -42,13 +42,13 @@ beestat.component.modal.change_system_type.prototype.decorate_contents_ = functi
|
|||||||
|
|
||||||
var titles = {
|
var titles = {
|
||||||
'heat': 'Heat',
|
'heat': 'Heat',
|
||||||
'heat_auxiliary': 'Auxiliary Heat',
|
'auxiliary_heat': 'Auxiliary Heat',
|
||||||
'cool': 'Cool'
|
'cool': 'Cool'
|
||||||
};
|
};
|
||||||
|
|
||||||
var colors = {
|
var colors = {
|
||||||
'heat': beestat.style.color.orange.base,
|
'heat': beestat.style.color.orange.base,
|
||||||
'heat_auxiliary': beestat.style.color.red.dark,
|
'auxiliary_heat': beestat.style.color.red.dark,
|
||||||
'cool': beestat.style.color.blue.light
|
'cool': beestat.style.color.blue.light
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user