# model.getLogicalSwitch(switch)

Get Logical Switch parameters

@status current Introduced in 2.0.0

## Parameters

* `switch` (unsigned number) logical switch number (use 0 for LS1)

## Return value

* `nil` requested logical switch does not exist
* `table` logical switch data:
  * `func` (number) function index, see [Logical Switch Function Constants](/lua-api-reference/constants/logical-switch-function-constants.md).
  * `v1` (number) V1 value (index)
  * `v2` (number) V2 value (index or value)
  * `v3` (number) V3 value (index or value)
  * `and` (number) AND switch index
  * `delay` (number) delay (time in 1/10 s)
  * `duration` (number) duration (time in 1/10 s)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://luadoc.edgetx.org/lua-api-reference/model/getlogicalswitch.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
