mirror of
https://git.steelants.cz/SH/PHP_SMART_HOME_V3.git
synced 2026-10-11 17:54:34 +00:00
Some minor changes of Automation system
This commit is contained in:
1 parent
aa8235c1bf
commit
b1e19dd64d
12 files changed
+106
-64
No files matched your search
@@ -30,6 +30,7 @@ class Ajax extends Template
|
||||
$subDeviceData = SubDeviceManager::getSubDevice($subDeviceId);
|
||||
$deviceId = SubDeviceManager::getSubDeviceMaster($subDeviceId)['device_id'];
|
||||
if ($subDeviceData['type'] == 'on/off'){
|
||||
//TODO: Pridelat kontrolu změnit stav pouze pokud se poslední [executed] stav != novému
|
||||
if (RecordManager::getLastRecord($subDeviceData['subdevice_id'])['value'] == 0){
|
||||
RecordManager::create($deviceId, 'on/off', 1);
|
||||
echo 'ON';
|
||||
|
||||
Reference in new issue
Block a user