> For the complete documentation index, see [llms.txt](https://luadoc.edgetx.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://luadoc.edgetx.org/opentx_2.3/part_iii_-_opentx_lua_api_reference/general-functions-less-than-greater-than-luadoc-begin-general/settelemetryvalue.md).

# setTelemetryValue(id, subID, instance, value \[, unit \[, precision \[, name]]])

@status current Introduced in 2.2.0

## Parameters

* `id` Id of the sensor, valid range is from 0 to 0xFFFF
* `subID` subID of the sensor, usually 0, valid range is from 0 to 7
* `instance` instance of the sensor (SensorID), valid range is from 0 to 0xFF
* `value` fed to the sensor
* `unit` unit of the sensor [Full list](https://github.com/opentx/opentx-2-3-lua-reference-guide/tree/0d355d19f1961b689994cf78b84005864d33f9b5/appendix/units.html)
* `precision` the precision of the sensor
  * `0 or not present` no decimal precision.
  * `!= 0` value is divided by 10^precision, e.g. value=1000, prec=2 => 10.00.
* `name` (string) Name of the sensor if it does not yet exist (4 chars).
  * `not present` Name defaults to the Id.
  * `present` Sensor takes name of the argument. Argument must have name surrounded by quotes: e.g., "Name"

## Return value

* `true,` if the sensor was just added. In this case the value is ignored (subsequent call will set the value)

### Notice

All three parameters `id`, `subID` and `instance` can't be zero at the same time. At least one of them must be different from zero.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://luadoc.edgetx.org/opentx_2.3/part_iii_-_opentx_lua_api_reference/general-functions-less-than-greater-than-luadoc-begin-general/settelemetryvalue.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
