From 2c591556addf9824e2b11b9bbc59490fcc87afdf Mon Sep 17 00:00:00 2001 From: Jon Ziebell Date: Tue, 4 Jun 2024 19:48:32 -0400 Subject: [PATCH] Fixed #410 - Setpoint reporting is way off --- api/profile.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/api/profile.php b/api/profile.php index cf8541b..42a1fe0 100644 --- a/api/profile.php +++ b/api/profile.php @@ -399,15 +399,21 @@ class profile extends cora\crud { // Log the setpoint. if( - $current_runtime['system_mode'] === 'heat' || - $current_runtime['system_mode'] === 'auto' + ( + $current_runtime['system_mode'] === 'heat' || + $current_runtime['system_mode'] === 'auto' + ) && + $current_runtime['setpoint_cool'] !== null ) { $setpoints['heat'][] = $current_runtime['setpoint_heat']; } if( - $current_runtime['system_mode'] === 'cool' || - $current_runtime['system_mode'] === 'auto' + ( + $current_runtime['system_mode'] === 'cool' || + $current_runtime['system_mode'] === 'auto' + ) && + $current_runtime['setpoint_cool'] !== null ) { $setpoints['cool'][] = $current_runtime['setpoint_cool']; }