mirror of
https://git.steelants.cz/SH/PHP_SMART_HOME_V3.git
synced 2026-10-11 17:54:34 +00:00
Tweeks
This commit is contained in:
1 parent
13ae5401f7
commit
e2c9c31d2f
5 files changed
+5
-5
No files matched your search
@@ -23,7 +23,7 @@ class AirQuality extends VirtualDeviceManager
|
||||
$json = json_decode(Utilities::CallAPI('GET', $finalUrl, ''), true);
|
||||
RecordManager::create($deviceId, $this->subdevice_type, $json['data']['aqi']);
|
||||
} else {
|
||||
DeviceManager::create($this->virtual_device_name, $this->virtual_device_name);
|
||||
DeviceManager::create($this->virtual_device_name, $this->virtual_device_name, 'senzore-virtual');
|
||||
DeviceManager::approved($this->virtual_device_name);
|
||||
}
|
||||
return 'sucessful';
|
||||
|
||||
@@ -27,7 +27,7 @@ class Covid extends VirtualDeviceManager
|
||||
RecordManager::create($deviceId, strtolower($dataItem), end($json)[$dataItem]);
|
||||
}
|
||||
} else {
|
||||
DeviceManager::create($this->virtual_device_name, $this->virtual_device_name);
|
||||
DeviceManager::create($this->virtual_device_name, $this->virtual_device_name, 'senzore-virtual');
|
||||
DeviceManager::approved($this->virtual_device_name);
|
||||
}
|
||||
return 'sucessful';
|
||||
|
||||
@@ -24,7 +24,7 @@ class OpenWeatherMap extends VirtualDeviceManager
|
||||
|
||||
RecordManager::create($deviceId, $this->subdevice_type, $json['weather'][0]['id']);
|
||||
} else {
|
||||
DeviceManager::create($this->virtual_device_name, $this->virtual_device_name);
|
||||
DeviceManager::create($this->virtual_device_name, $this->virtual_device_name, 'senzore-virtual');
|
||||
DeviceManager::approved($this->virtual_device_name);
|
||||
}
|
||||
return 'sucessful';
|
||||
|
||||
@@ -56,7 +56,7 @@ class Spotify extends VirtualDeviceManager
|
||||
// function make()
|
||||
// {
|
||||
// try {
|
||||
// //$this->autorize();
|
||||
// //$this->autorize();d
|
||||
// //$this->getPlayerData();
|
||||
// return 'sucessful';
|
||||
// } catch (Exception $e) {
|
||||
|
||||
@@ -54,7 +54,7 @@ class UsaElection extends VirtualDeviceManager
|
||||
RecordManager::create($deviceId, strtolower($Category), round(($$Category / $OnePercent)));
|
||||
}
|
||||
} else {
|
||||
DeviceManager::create($this->virtual_device_name, $this->virtual_device_name);
|
||||
DeviceManager::create($this->virtual_device_name, $this->virtual_device_name, 'senzore-virtual');
|
||||
DeviceManager::approved($this->virtual_device_name);
|
||||
}
|
||||
return 'sucessful';
|
||||
|
||||
Reference in new issue
Block a user