mirror of
https://git.steelants.cz/SH/PHP_SMART_HOME_V3.git
synced 2026-10-11 17:54:34 +00:00
Covid last Data Fix
This commit is contained in:
1 parent
ce05533d29
commit
0b954b79c0
1 file changed
+1
-1
@@ -23,7 +23,7 @@ class Covid extends VirtualDeviceManager
|
||||
$json = json_decode(Utilities::CallAPI('GET', $finalUrl, ''), true);
|
||||
|
||||
foreach ($dataItems as $dataItem) {
|
||||
RecordManager::create($deviceId, strtolower($dataItem), $json[0][$dataItem]);
|
||||
RecordManager::create($deviceId, strtolower($dataItem), end($json)[$dataItem]);
|
||||
}
|
||||
} else {
|
||||
DeviceManager::create($this->virtual_device_name, $this->virtual_device_name);
|
||||
|
||||
Reference in new issue
Block a user