From adfd70c13a1b547c3e6e9a97d7afc0dba8073a98 Mon Sep 17 00:00:00 2001 From: Jon Ziebell Date: Tue, 18 Feb 2020 18:54:50 -0500 Subject: [PATCH] Fixed #247 - Primary thermostat missing on Sensor Detail --- api/runtime.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/runtime.php b/api/runtime.php index 96b6a57..d068160 100644 --- a/api/runtime.php +++ b/api/runtime.php @@ -744,7 +744,7 @@ class runtime extends cora\api { // Create or update the database foreach ($datas as $data) { - if(isset($data['temperature']) === true && isset($data['occupancy']) === true) { + if(isset($data['temperature']) === true || isset($data['occupancy']) === true) { if(isset($existing_timestamps[$data['sensor_id']][$data['timestamp']]) === true) { $data['runtime_sensor_id'] = $existing_timestamps[$data['sensor_id']][$data['timestamp']]; $this->database->update('runtime_sensor', $data, 'id');