From 431df7e932111ffb810b476f141cc67828d9f116 Mon Sep 17 00:00:00 2001 From: Jon Ziebell Date: Mon, 17 Jun 2019 22:48:45 -0400 Subject: [PATCH] Fixed #128 Division by zero error when generating temperature profiles Was not excluding inactive thermostats which caused a count to be 0 which caused a number to be divided by 0. --- api/thermostat_group.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/thermostat_group.php b/api/thermostat_group.php index ada083d..97b7201 100644 --- a/api/thermostat_group.php +++ b/api/thermostat_group.php @@ -56,7 +56,8 @@ class thermostat_group extends cora\crud { 'read', [ 'attributes' => [ - 'thermostat_group_id' => $thermostat_group_id + 'thermostat_group_id' => $thermostat_group_id, + 'inactive' => 0 ] ] );