Tuya devices don't expose named attributes locally. They expose data points (DPS, DP IDs): numbered values such as
{"1": true, "9": 0, "18": 142, "19": 318, "20": 2297}
On a smart plug this might be switch on, countdown 0 s, current 142 mA, power 31.8 W, voltage 229.7 V, but only the device's own definition tells you, and scaling (e.g. power in tenths of a watt) is part of that definition.
Data types
Tuya's standard instruction set uses these data types:
| Type | Example |
|---|---|
| Boolean | switch on/off |
| Integer | brightness, temperature setpoint (with min, max, step, scale) |
| Enum | mode: low / medium / high |
| String | a text value with a maximum length |
| JSON | structured values such as color data |
Numbers differ per device
The same DP number can mean different things on different products, even with the same model ID. Don't copy a DP map from another device without checking.
How to map an unknown device
- Read the full status (
status()in TinyTuya) and write it down. - Change one thing in the Smart Life app (turn on, change mode, set brightness) and read again. The DP that changed is the one for that function.
- Note the value range and whether values look scaled (x10, x100).
- If you created a Tuya IoT cloud project, its device debugging views show the product's DP definitions. That's the most reliable source.
- Write the map into your integration's config (Tuya Local device file, LocalTuya entity setup, Home Assistant template) and share it with the project so others don't have to repeat the work.
Tuya Zigbee devices use the same DP idea over a Tuya-specific cluster (see the Zigbee item).