TS0601 wrong temperature 6552.8C

Hi.
Tonight the sensor became broken. Changed batteries, rebooted HA etc, does not help. Other Zigbee temp sensors works OK.

image

When I press the button on the sensor, decimals change (say, 6552.7C). Plz help.

However this happens only when the temperature drops below 0 degrees Celsius.

Is the other one the same model and using the same quirk? That looks like an integer issue. Like a uint that should be an int.

Yep, I managed to find out it is uint/int issue. Yet I’m unable to use custom quirk zha-device-handlers/zhaquirks/tuya/ts0601_sensor.py at a5a00d939545409199475ca7d11e8e7be2d4b086 · zigpy/zha-device-handlers · GitHub , it renders the device inaccessible. I’m still trying to figure out what can be fixed.

The device works correctly with zigbee2mqtt though.

This worked correctly prior to HA 2024.11?

I don’t know, the winter has just started, there were no minus temperatures before.

From what I understood, zha-device-handlers/zhaquirks/tuya/ts0601_sensor.py at a5a00d939545409199475ca7d11e8e7be2d4b086 · zigpy/zha-device-handlers · GitHub is probably using QuirksV2 API. And even in this case:

TuyaQuirkBuilder("_TZE200_a8sdabtg", "TS0601")  # Variant without screen, round
    .applies_to("_TZE200_qoy0ekbd", "TS0601")
    .applies_to("_TZE200_znbl8dj5", "TS0601")
    .applies_to("_TZE200_qyflbnbj", "TS0601")

is wrong, because _TZE200_qyflbnbj is a variant with the screen.

Please open an incident in the zha quirks repo. It’s possible that when I converted all of the sensors to V2 quirks I missed something. Either that, or it just never handled negative temperatures.

1 Like

There is a device support request already. Would you look at it? [Device Support Request] TS0601 _TZE200_qyflbnbj Tuya outdoor temperature and humidity sensor · Issue #2113 · zigpy/zha-device-handlers · GitHub

That support request was closed and any posts to it are unlikely to be seen. A new one will help get attention and track this issue.

That quirk applies to multiple devices, the note only applies to the first device listed. It should show as a V2 quirk in the ui.

I looked at the underlying function, it still uses an int as mentioned in the original support request, that wasn’t changed. To troubleshoot we would need logs, enable debug logging, showing the full packet from the device and the the resulting parsed value as well as a note about what it should parse to. Would be good to capture the same for a temp above zero also.