mirror of
https://git.steelants.cz/SH/PHP_SMART_HOME_V3.git
synced 2026-10-11 17:54:34 +00:00
Automation api Endpoint
This commit is contained in:
1 parent
821c0926e8
commit
38b29a2a4a
2 files changed
+25
No files matched your search
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
class AutomationsApi extends ApiController
|
||||
{
|
||||
|
||||
public function default()
|
||||
{
|
||||
//$this->requireAuth();
|
||||
$response = [];
|
||||
$automationData = AutomationManager::getAll();
|
||||
|
||||
foreach ($automationData as $automationKey => $automation) {
|
||||
$response[] = [
|
||||
"automation_id" => $automation['automation_id'],
|
||||
"name" => $automation['name'],
|
||||
"enabled" => $automation['enabled'],
|
||||
];
|
||||
}
|
||||
|
||||
$this->response($response);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user