From 7ffea8ec2d00ba4ff3c68d73ea3e66a81746c717 Mon Sep 17 00:00:00 2001 From: Jon Ziebell Date: Wed, 27 May 2020 08:27:09 -0400 Subject: [PATCH] Fixed #273 - Thermostat group temperature profiles overwrite each other Variable got overwritten with another variable. --- api/temperature_profile.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/api/temperature_profile.php b/api/temperature_profile.php index 1097665..ce0a7d3 100644 --- a/api/temperature_profile.php +++ b/api/temperature_profile.php @@ -129,10 +129,7 @@ class temperature_profile extends cora\api { ); // Get all of the relevant data - $thermostat_ids = []; - foreach($group_thermostats as $thermostat) { - $thermostat_ids[] = $thermostat['thermostat_id']; - } + $thermostat_ids = array_column($group_thermostats, 'thermostat_id'); /** * Get the largest possible chunk size given the number of thermostats I