> For the complete documentation index, see [llms.txt](https://docs.mclimate.eu/mclimate-lorawan-devices/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mclimate.eu/mclimate-lorawan-devices/devices/mclimate-ht-sensor-lorawan/ht-sensor-lorawan-device-communication-protocol/temperature-and-humidity-compensation.md).

# Temperature and humidity compensation

## Measured temperature compensation

This command is used to set/get the measured temperature compensation in °C.

*The actual keepalive payload is omitted for clarity.*

{% hint style="warning" %}
This command/functionality is supported only for devices with Firmware version ≥2.2
{% endhint %}

{% tabs %}
{% tab title="SET" %}

| **Byte index** | **Hex value - Meaning**                                        |
| -------------- | -------------------------------------------------------------- |
| 0              | 31 - command code                                              |
| 1              | <p>00: Positive compensation<br>01: Negative compensation</p>  |
| 2              | <p>XX - Tcomp\[°C] \* 10<br><strong>Default: 0x00</strong></p> |

**Example command**: 0x31000F – When we separate the value of the temperature from the command code we get 0x**000F,** which means positive compensation of 1.5°C. Thus, if the real measured temperature is 25, the device will report 26.5.
{% endtab %}

{% tab title="GET" %}

| **Byte index** | **Hex value - Meaning**                                       |
| -------------- | ------------------------------------------------------------- |
| 0              | 32 - command code                                             |
| 1              | <p>00: Positive compensation<br>01: Negative compensation</p> |
| 2              | XX - Tcomp\[°C] \* 10                                         |

**Example command**: 0x32

**Example command**: 0x320103 – When we separate the value of the temperature from the command code we get 0x**000F,** which means negative compensation of 0.5°C. Thus, if the real measured temperature is 25, the device will report 24.7.
{% endtab %}
{% endtabs %}

{% hint style="info" %}
The allowed range is -25.5... 25.5°C (0.1°C resolution).
{% endhint %}

## Measured humidity compensation

This command is used to set/get the measured humidity compensation in %.

{% hint style="warning" %}
This command/functionality is supported only for devices with Firmware version ≥2.2
{% endhint %}

*The actual keepalive payload is omitted for clarity.*

{% tabs %}
{% tab title="SET" %}

| **Byte index** | **Hex value - Meaning**                                       |
| -------------- | ------------------------------------------------------------- |
| 0              | 33 - command code                                             |
| 1              | <p>00: Positive compensation<br>01: Negative compensation</p> |
| 2              | <p>XX - Hcomp\[%] \* 10<br><strong>Default: 0x00</strong></p> |

**Example command**: 0x310005 – When we separate the value of the humidity from the command code we get 0x**0005,** which means positive compensation of 5%. Thus, if the real measured humidity is 55, the device will report 60.
{% endtab %}

{% tab title="GET" %}

| **Byte index** | **Hex value - Meaning**                                       |
| -------------- | ------------------------------------------------------------- |
| 0              | 34 - command code                                             |
| 1              | <p>00: Positive compensation<br>01: Negative compensation</p> |
| 2              | XX - Hcomp\[%] \* 10                                          |

**Example command**: 0x32

**Example command**: 0x320103 – When we separate the value of the humidity from the command code we get 0x**0003,** which means negative compensation of  3%. Thus, if the real measured humidity is 50, the device will report 47.
{% endtab %}
{% endtabs %}

{% hint style="info" %}
The allowed range is -99... 99% (1% resolution).
{% endhint %}


---

# 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://docs.mclimate.eu/mclimate-lorawan-devices/devices/mclimate-ht-sensor-lorawan/ht-sensor-lorawan-device-communication-protocol/temperature-and-humidity-compensation.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.
