From 6ebe758561c2fe3b472f91fba963d89ad69094fd Mon Sep 17 00:00:00 2001 From: Jon Ziebell Date: Sun, 11 Jun 2023 17:35:48 -0400 Subject: [PATCH] Fixed #398 - downloaded data - unable to distinguish between occupancy of null vs. occupancy of zero --- api/runtime.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/runtime.php b/api/runtime.php index 72b3f72..9a215cd 100644 --- a/api/runtime.php +++ b/api/runtime.php @@ -1159,7 +1159,7 @@ class runtime extends cora\api { } $csv_row[] = $runtime_sensors_by_timestamp[$current_timestamp][$sensor['sensor_id']]['temperature']; - $csv_row[] = $runtime_sensors_by_timestamp[$current_timestamp][$sensor['sensor_id']]['occupancy']; + $csv_row[] = ($runtime_sensors_by_timestamp[$current_timestamp][$sensor['sensor_id']]['occupancy'] === true ? '1' : '0'); } } } else {