From 3e6b03f93f087b7b593d165d9d2726a0d43d8d4a Mon Sep 17 00:00:00 2001 From: Jon Ziebell Date: Wed, 15 Dec 2021 07:47:40 -0500 Subject: [PATCH] Fixed #347 - Setpoint metrics don't generate when system is set to auto --- api/profile.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/api/profile.php b/api/profile.php index 1bcaab5..87180a2 100644 --- a/api/profile.php +++ b/api/profile.php @@ -378,10 +378,18 @@ class profile extends cora\api { $current_runtime['outdoor_temperature'] = round($current_runtime['outdoor_temperature'] / $smoothing) * $smoothing; } - // If the system mode was heat or cool, log the setpoint. - if($current_runtime['system_mode'] === 'heat') { + // Log the setpoint. + if( + $current_runtime['system_mode'] === 'heat' || + $current_runtime['system_mode'] === 'auto' + ) { $setpoints['heat'][] = $current_runtime['setpoint_heat']; - } else if($current_runtime['system_mode'] === 'cool') { + } + + if( + $current_runtime['system_mode'] === 'cool' || + $current_runtime['system_mode'] === 'auto' + ) { $setpoints['cool'][] = $current_runtime['setpoint_cool']; }