> For the complete documentation index, see [llms.txt](https://docs.blynk.io/en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.blynk.io/en/blynk.console/templates/datastreams/unit-conversion.md).

# Unit Conversion

Unit conversion lets Blynk automatically display sensor values in a different unit than what your device reports — without changing the data your device sends or how it's stored.

For example, a device that reports temperature in *°C* can show values to users in *°F.* A flow sensor reporting in *l/min* can display readings in *CFM*. No firmware changes needed.

***

### How it works

Each datastream has a **base unit** — the unit your device sends. When conversion is enabled, Blynk shows that value in the user's preferred unit using one of two methods:

* **Formula** — Blynk applies a conversion formula to the value (for example, °C → °F). This is the default.
* **Paired datastream** — if the device already streams the same measurement in two units on separate pins (for example, V1 = °C, V2 = °F), Blynk reads the matching datastream directly instead of calculating.

{% hint style="info" %}
Note: Conversion changes only how values are displayed. The raw value stored on server is always the value your device sent, so historical data, the API, and exported reports remain in the device's original (base) unit.
{% endhint %}

### Enabling conversion per datastream

Conversion can be turned off for an individual datastream in the Units tab of Datastream Settings. The toggle appears only when the selected unit is convertible, and is on by default. When off, that datastream always displays in its base unit regardless of the user's unit system.

<figure><img src="/files/miA1SiQoRQLjtLPn1TT8" alt=""><figcaption></figcaption></figure>

### Unit conversion levels

Unit preferences can be set at multiple levels: per user, per device, per organization, or per template — with more specific settings taking priority.

| Priority                                             | Level                                    | Set by       | Purpose                                                      |
| ---------------------------------------------------- | ---------------------------------------- | ------------ | ------------------------------------------------------------ |
| 1 (highest, if added will override all other levels) | Unit Conversion Switch (device metadata) | Manufacturer | Keep the app in sync with a unit toggle on the device itself |
| 2                                                    | User preference                          | End user     | "I prefer Imperial"                                          |
| 3                                                    | Organization                             | Org admin    | Company-wide default                                         |
| 4 (lowest)                                           | Template default                         | Manufacturer | The unit a product ships with                                |

### Smart Unit Scaling

Beyond converting between systems, Blynk can automatically scale a value to the most readable unit within the same system — showing `2.5 kg` instead of `2500 g`, or `45 kW` instead of `45000 W`. Some quantities scale as a single decimal value; others that read more naturally in two parts (time, imperial length and mass) display as a composite, like `2 days 19 hr` or `5 ft 8 in`.

Smart scaling is a display-only convenience and never changes the stored value. It can be toggled on the Units tab of Datastream Settings. The toggle appears only when the selected unit supports smart scaling, and is **enabled** by default.

<figure><img src="/files/AFZnIe1ugUq3MksVELzU" alt=""><figcaption></figcaption></figure>


---

# 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 dynamically by asking a question.

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

```
GET https://docs.blynk.io/en/blynk.console/templates/datastreams/unit-conversion.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
