From 6415e61042dd3518bf11a2a1cf60eb47de697696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc?= <1536036+zoic21@users.noreply.github.com> Date: Tue, 27 Aug 2024 09:20:42 +0200 Subject: [PATCH] improve get data --- core/class/ajaxSystem.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/class/ajaxSystem.class.php b/core/class/ajaxSystem.class.php index 7eb8552..18092cf 100644 --- a/core/class/ajaxSystem.class.php +++ b/core/class/ajaxSystem.class.php @@ -164,6 +164,7 @@ public static function sync() { $eqLogic->setConfiguration('firmware', $hub_info['firmware']['version']); $eqLogic->setLogicalId($hub['hubId']); $eqLogic->save(); + $eqLogic->refreshData(); $devices = self::request('/user/{userId}/hubs/' . $hub['hubId'] . '/devices'); log::add('ajaxSystem', 'debug', json_encode($devices)); @@ -185,6 +186,7 @@ public static function sync() { $eqLogic->setConfiguration('firmware', $device_info['firmwareVersion']); $eqLogic->setLogicalId($device['id']); $eqLogic->save(); + $eqLogic->refreshData(); } $groups = self::request('/user/{userId}/hubs/' . $hub['hubId'] . '/groups'); @@ -204,6 +206,7 @@ public static function sync() { $eqLogic->setConfiguration('device', 'group'); $eqLogic->setLogicalId($group['id']); $eqLogic->save(); + $eqLogic->refreshData(); } } }