# model.getSensor(sensor)

Get Telemetry Sensor parameters

@status current Introduced in 2.3.0

## Parameters

* `sensor` (unsigned number) sensor number (use 0 for sensor 1)

## Return value

* `nil` requested sensor does not exist
* `table` with sensor data:
  * `type` (number) 0 = custom, 1 = calculated
  * `name` (string) Name
  * `unit` (number) See list of units in the appendix of the OpenTX Lua Reference Guide
  * `prec` (number) Number of decimals
  * `id` (number) Only custom sensors
  * `instance` (number) Only custom sensors
  * `formula` (number) Only calculated sensors. 0 = Add etc. see list of formula choices in Companion popup


---

# 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/edgetx-v2.7/part_iii_-_opentx_lua_api_reference/model-functions-less-than-greater-than-luadoc-begin-model/getsensor.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.
