From de19cd53cc98bb6a8c8aa0e32f8a00a7c133fe93 Mon Sep 17 00:00:00 2001 From: Jon Ziebell Date: Mon, 26 Sep 2022 22:32:23 -0400 Subject: [PATCH] Fixed minor sync issue when merging thermostats --- api/runtime.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/runtime.php b/api/runtime.php index 3c3d867..570e33d 100644 --- a/api/runtime.php +++ b/api/runtime.php @@ -75,7 +75,9 @@ class runtime extends cora\api { ( $thermostat['sync_begin'] !== null && 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']) ) { $this->sync_forwards($thermostat_id);