diff --git a/automation/Scopes/HallScope.php b/automation/Scopes/HallScope.php index 0d08719..7ebba06 100644 --- a/automation/Scopes/HallScope.php +++ b/automation/Scopes/HallScope.php @@ -34,7 +34,7 @@ $this -> add_hatch_action("hatch_open", "Открыть люк", "hatch_motor", "open", 100, [ "icon" => '', - "description" => "Открыть люк в мансарду", + "description" => "Открыть люк в подвал", "author" => "Eugene Sukhodolskiy", "danger_level" => "dangerous", "state_callback" => function() { @@ -44,7 +44,7 @@ $this -> add_hatch_action("hatch_close", "Закрыть люк", "hatch_motor", "close", 100, [ "icon" => '', - "description" => "Закрыть люк в мансарду", + "description" => "Закрыть люк в подвал", "author" => "Eugene Sukhodolskiy", "danger_level" => "dangerous", "state_callback" => function() { diff --git a/server/SHServ/Tools/DeviceAPI/Hatch.php b/server/SHServ/Tools/DeviceAPI/Hatch.php index 3aa7e98..c7ca4cc 100644 --- a/server/SHServ/Tools/DeviceAPI/Hatch.php +++ b/server/SHServ/Tools/DeviceAPI/Hatch.php @@ -10,7 +10,7 @@ return null; } - return $state; + return $status_response['hatch']['state'] ?? null; } public function is_opened(): Bool | null {