mirror of
https://git.steelants.cz/SH/PHP_SMART_HOME_V3.git
synced 2026-10-11 17:54:34 +00:00
Automation and api fixes
This commit is contained in:
1 parent
97e955d382
commit
1ea7e600c2
13 files changed
+152
-54
No files matched your search
+10
-2
@@ -41,7 +41,11 @@ class Ajax extends Template
|
||||
|
||||
} else if (isset($_POST['automation_id'])){
|
||||
$automationId = $_POST['automation_id'];
|
||||
AutomationManager::deactive($automationId);
|
||||
if (isset($_POST['action']) && $_POST['action'] == 'delete') {
|
||||
AutomationManager::remove($automationId);
|
||||
}else {
|
||||
AutomationManager::deactive($automationId);
|
||||
}
|
||||
} else if (isset($_POST['subDevice']) && isset($_POST['action']) && $_POST['action'] == "chart") {
|
||||
//TODO lepe rozstrukturovat
|
||||
$subDeviceId = $_POST['subDevice'];
|
||||
@@ -154,7 +158,11 @@ class Ajax extends Template
|
||||
die();
|
||||
} else if (isset($_POST['scene_id'])) {
|
||||
$sceneId = $_POST['scene_id'];
|
||||
echo SceneManager::execScene($sceneId);
|
||||
if (isset($_POST['action']) && $_POST['action'] == 'delete') {
|
||||
SceneManager::delete($sceneId);
|
||||
}else {
|
||||
echo SceneManager::execScene($sceneId);
|
||||
}
|
||||
}
|
||||
|
||||
die();
|
||||
|
||||
Reference in new issue
Block a user