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

Fixed #186 - Fan and accessory runtime is not populating properly in summary tables

This commit is contained in:
Jon Ziebell 2019-11-14 22:20:46 -05:00
parent 94ae162c6c
commit 48bff35f00

View File

@ -424,8 +424,6 @@ class runtime_thermostat extends cora\crud {
$data['auxiliary_heat_1'] = $columns['auxHeat1'] - $columns['auxHeat2'];
$data['auxiliary_heat_2'] = $columns['auxHeat2'];
$data['fan'] = $columns['fan'];
if($columns['humidifier'] > 0) {
$data['accessory_type'] = 'humidifier';
$data['accessory'] = $columns['humidifier'];
@ -443,6 +441,17 @@ class runtime_thermostat extends cora\crud {
$data['accessory'] = 0;
}
// Ecobee does not report fan usage when it does not control the fan, so
// this will mark the fan as running when certain equipment is on.
$data['fan'] = max(
$columns['fan'],
$data['compressor_1'],
$data['compressor_2'],
$data['auxiliary_heat_1'],
$data['auxiliary_heat_2'],
$data['accessory']
);
$system_modes = [
'auto' => 'auto',
'cool' => 'cool',