Closed boskar closed 4 months ago
t.uint32_t is incorrect? t.int16_t should be used?
I would suggest to try with a t.int32_t
type.
Sorry guys, I need help. Do I need to "recompile" in any way?
No matter what modification I make in ts0601_electric_heating.py
, after
home-assistant@homeassistant stop
home-assistant@homeassistant start
the reported temperature remains the same, basically nothing changes in the web panel. the pyc file gets built again, If I put incorrect type (like suggested ```t.int32_t````) the module reports an error, but otherwise I'm stuck with "65526" in temperature (id: 0x0218) - MoesBHTUserInterface (Endpoint id: 1, Id: 0x0204, Type: in)
OK, I still do not know what I was doing wrong in terms of testing my modification, but after full reboot It does take my modifications.
Currently:
gru 24 12:47:18 router hass[920]: File "/srv/homeassistant/lib/python3.11/site-packages/zigpy/endpoint.py", line 235, in handle_message
gru 24 12:47:18 router hass[920]: handler(hdr, args, dst_addressing=dst_addressing)
gru 24 12:47:18 router hass[920]: File "/srv/homeassistant/lib/python3.11/site-packages/zigpy/zcl/__init__.py", line 426, in handle_message
gru 24 12:47:18 router hass[920]: self.handle_cluster_request(hdr, args, dst_addressing=dst_addressing)
gru 24 12:47:18 router hass[920]: File "/srv/homeassistant/lib/python3.11/site-packages/zhaquirks/tuya/__init__.py", line 495, in handle_cluster_request
gru 24 12:47:18 router hass[920]: zvalue = ztype(tuya_data)
gru 24 12:47:18 router hass[920]: ^^^^^^^^^^^^^^^^
gru 24 12:47:18 router hass[920]: File "/srv/homeassistant/lib/python3.11/site-packages/zigpy/types/basic.py", line 94, in __new__
gru 24 12:47:18 router hass[920]: raise ValueError(
gru 24 12:47:18 router hass[920]: ValueError: 65531 is not an signed 16 bit integer
with
MOESBHT_TEMPERATURE_ATTR: ("temperature", t.int16s, True),
I'm afraid it's more complex than that.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Bug description
TS0601 _TZE200_aoclfnxz reports incorrect temperature (device probably report signed value)
Steps to reproduce
Expected behavior
The sensor should report correct, negative temperature
Screenshots/Video
Screenshots/Video
![Screenshot 2023-12-03 at 01-56-21 Przegląd – Home Assistant](https://github.com/zigpy/zha-device-handlers/assets/3456185/da370b22-b29e-4178-998c-b72ed806a9cb) ![Przechwycenie obrazu ekranu_2023-12-03_02-36-38](https://github.com/zigpy/zha-device-handlers/assets/3456185/b9df5cb9-7c24-45e0-ae83-5de488553065)Device signature
Device signature
```json TS0601 producent: _TZE200_aoclfnxz ```Diagnostic information
Diagnostic information
```json { "home_assistant": { "installation_type": "Home Assistant Core", "version": "2023.11.3", "dev": false, "hassio": false, "virtualenv": true, "python_version": "3.11.2", "docker": false, "arch": "x86_64", "timezone": "Europe/Warsaw", "os_name": "Linux", "os_version": "6.1.0-13-amd64", "run_as_root": false }, "custom_components": {}, "integration_manifest": { "domain": "zha", "name": "Zigbee Home Automation", "after_dependencies": [ "onboarding", "usb" ], "codeowners": [ "@dmulcahey", "@adminiuga", "@puddly" ], "config_flow": true, "dependencies": [ "file_upload" ], 1111111111110001 0000000000001110 1111111111110001 "documentation": "https://www.home-assistant.io/integrations/zha", "iot_class": "local_polling", "loggers": [ "aiosqlite", "bellows", "crccheck", "pure_pcapy3", "zhaquirks", "zigpy", "zigpy_deconz", "zigpy_xbee", "zigpy_zigate", "zigpy_znp", "universal_silabs_flasher" ], "requirements": [ "bellows==0.36.8", "pyserial==3.5", "pyserial-asyncio==0.6", "zha-quirks==0.0.106", "zigpy-deconz==0.21.1", "zigpy==0.59.0", "zigpy-xbee==0.19.0", "zigpy-zigate==0.11.0", "zigpy-znp==0.11.6", "universal-silabs-flasher==0.0.14", "pyserial-asyncio-fast==0.11" ], "usb": [ { "vid": "10C4", "pid": "EA60", "description": "*2652*", "known_devices": [ "slae.sh cc2652rb stick" ] }, { "vid": "1A86", "pid": "55D4", "description": "*sonoff*plus*", "known_devices": [ "sonoff zigbee dongle plus v2" ] }, { "vid": "10C4", "pid": "EA60", "description": "*sonoff*plus*", "known_devices": [ "sonoff zigbee dongle plus" ] }, { "vid": "10C4", "pid": "EA60", "description": "*tubeszb*", "known_devices": [ "TubesZB Coordinator" ] }, { "vid": "1A86", "pid": "7523", "description": "*tubeszb*", "known_devices": [ "TubesZB Coordinator" ] }, { "vid": "1A86", "pid": "7523", "description": "*zigstar*", "known_devices": [ "ZigStar Coordinators" ] }, { "vid": "1CF1", "pid": "0030", "description": "*conbee*", "known_devices": [ "Conbee II" ] }, { "vid": "10C4", "pid": "8A2A", "description": "*zigbee*", "known_devices": [ "Nortek HUSBZB-1" ] }, { "vid": "0403", "pid": "6015", "description": "*zigate*", "known_devices": [ "ZiGate+" ] }, { "vid": "10C4", "pid": "EA60", "description": "*zigate*", "known_devices": [ "ZiGate" ] }, { "vid": "10C4", "pid": "8B34", "description": "*bv 2010/10*", "known_devices": [ "Bitron Video AV2010/10" ] } ], "zeroconf": [ { "type": "_esphomelib._tcp.local.", "name": "tube*" }, { "type": "_zigate-zigbee-gateway._tcp.local.", "name": "*zigate*" }, { "type": "_zigstar_gw._tcp.local.", "name": "*zigstar*" }, { "type": "_uzg-01._tcp.local.", "name": "uzg-01*" }, { "type": "_slzb-06._tcp.local.", "name": "slzb-06*" } ], "is_built_in": true }, "data": { "ieee": "**REDACTED**", "nwk": 47357, "manufacturer": "_TZE200_aoclfnxz", "model": "TS0601", "name": "_TZE200_aoclfnxz TS0601", "quirk_applied": true, "quirk_class": "zhaquirks.tuya.ts0601_electric_heating.MoesBHT", "quirk_id": null, "manufacturer_code": 4098, "power_source": "Mains", "lqi": 126, "rssi": null, "last_seen": "2023-12-03T02:16:41", "available": true, "device_type": "Router", "signature": { "node_descriptor": "NodeDescriptor(logical_type=Logs
Logs
```python [Paste the logs here] ```Additional information
655210 (dec) = 1111111111110001 (unsigned 16 bit bin) 1111111111110001 (signed 16 bit bin) = -15 (dec)
https://github.com/zigpy/zha-device-handlers/blob/aeca76da0ea81ecba5b17e0f7314620cd686faae/zhaquirks/tuya/ts0601_electric_heating.py#L39C69-L39C69 t.uint32_t is incorrect? t.int16_t should be used?