From 8f90bd154b3405138f18b9f63d7f053c2db9f05b Mon Sep 17 00:00:00 2001 From: Jon Ziebell Date: Fri, 30 Sep 2022 12:30:49 -0400 Subject: [PATCH] Fixed minor sync issue when merging thermostats --- api/runtime.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/runtime.php b/api/runtime.php index 570e33d..e29c014 100644 --- a/api/runtime.php +++ b/api/runtime.php @@ -77,7 +77,10 @@ class runtime extends cora\api { strtotime($thermostat['sync_begin']) <= strtotime('-1 year') ) || // For when merging thermostats and sync_begin is less than first_connected - strtotime($thermostat['sync_begin']) <= strtotime($thermostat['first_connected']) + ( + $thermostat['sync_begin'] !== null && + strtotime($thermostat['sync_begin']) <= strtotime($thermostat['first_connected']) + ) ) { $this->sync_forwards($thermostat_id);