zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

TS0201 Temp and Hum Sensor returning no decimal places if value is x.0

Open SMerrony opened this issue 2 years ago • 3 comments

What happened?

I have temperature_precision set to 1 for these devices (WSD500A TuYa). The temperature values are returned as expected unless the value is n.0, in which case it is returned as an integer.

Attached is some debug output (from Node-RED) showing the issue. The first reading is as expected, the second is not. TempHum

What did you expect to happen?

The temperature reading should always return one decimal place.

How to reproduce it (minimal and precise)

Set to one decimal place, wait for a reading ending in .0

Zigbee2MQTT version

1.31.2

Adapter firmware version

20210120

Adapter

Electrollama stick

Debug log

No response

SMerrony avatar Oct 02 '23 13:10 SMerrony

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Nov 03 '23 00:11 github-actions[bot]

I should add that this causes problems downstream when a float is expected, but an integer arrives...

SMerrony avatar Nov 03 '23 06:11 SMerrony

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days

github-actions[bot] avatar May 02 '24 00:05 github-actions[bot]