zha-device-handlers
zha-device-handlers copied to clipboard
TZE200_locansqn TS0601 Temp / Humi / Clock
Hi everybody,
My Tuya devices has no entities/controls in home assistant. It´s Zigbee Tuya Temp & Humi Display with integr. Clock.
Thanks in advance for the support.
Additiional Information:
022-01-15 20:45:22 DEBUG (MainThread) [zigpy.appdb] [0x62e0:1:0x0001] Attribute id: 32 value: 31.1 2022-01-15 20:45:22 DEBUG (MainThread) [zigpy.appdb] [0x62e0:1:0x0001] Attribute id: 33 value: 200 2022-01-15 20:45:22 DEBUG (MainThread) [zigpy.appdb] [0xfb52:1:0x0001] Attribute id: 32 value: 28 2022-01-15 20:45:22 DEBUG (MainThread) [zigpy.appdb] [0xf2c7:1:0x0001] Attribute id: 33 value: 94 2022-01-15 20:45:22 DEBUG (MainThread) [zigpy.appdb] [0x106c:1:0x0006] Attribute id: 0 value: 0 2022-01-15 20:45:22 DEBUG (MainThread) [zigpy.appdb] [0x106c:1:0x0008] Attribute id: 0 value: 254 2022-01-15 20:45:22 DEBUG (MainThread) [zigpy.appdb] [0x4f93:1:0x0000] Attribute id: 4 value: _TZE200_locansqn 2022-01-15 20:45:22 DEBUG (MainThread) [zigpy.appdb] [0x4f93:1:0x0000] Attribute id: 5 value: TS0601 2022-01-15 20:45:22 DEBUG (MainThread) [zigpy.appdb] [0x4f93:1:0x0001] Attribute id: 49 value: 3 2022-01-15 20:45:22 DEBUG (MainThread) [zigpy.appdb] [0x4f93:1:0x0001] Attribute id: 51 value: 2 2022-01-15 20:45:22 DEBUG (MainThread) [zigpy.appdb] [0x4f93:1:0x0000] Attribute id: 1 value: 67 2022-01-15 20:45:22 DEBUG (MainThread) [zigpy.appdb] [0x4f93:1:0x0000] Attribute id: 65506 value: 49 2022-01-15 20:45:22 DEBUG (MainThread) [zigpy.appdb] [0x4f93:1:0x0000] Attribute id: 65508 value: 0 2022-01-15 20:45:22 DEBUG (MainThread) [zigpy.appdb] [0x4f93:1:0xef00] Attribute id: 513 value: 217 2022-01-15 20:45:22 DEBUG (MainThread) [zigpy.appdb] [0x4f93:1:0xef00] Attribute id: 514 value: 60 2022-01-15 20:45:22 DEBUG (MainThread) [zigpy.appdb] [0x4f93:1:0xef00] Attribute id: 516 value: 100 2022-01-15 20:45:22 DEBUG (MainThread) [zigpy.appdb] [0x4f93:1:0x0001] Attribute id: 33 value: 200 2022-01-15 20:45:22 DEBUG (MainThread) [zigpy.appdb] [0x4f93:1:0x0000] Attribute id: 65503 value: h�u)o�u)ep�u)
Attr: 513 Temp /10 Attr: 514 Humidity Attr: 516 Batterie
now i need a little help . The Values don´t appear on HA. I dont know how to change the Programm.
I modified this ts0601_temperature.py.txt
Some Log...
2022-01-17 22:09:41 INFO (MainThread) [ts0601_temperature] toy3375 514, 56 2022-01-17 22:09:41 INFO (MainThread) [ts0601_temperature] toy3375 humid, 56 2022-01-17 22:09:41 ERROR (MainThread) [zigpy_deconz.uart] Unexpected error handling the frame: 'measured_value' 2022-01-17 22:09:42 DEBUG (MainThread) [zhaquirks.tuya] [0x77f3:1:0xef00] Received value [2] for attribute 0x040e (command 0x0002) 2022-01-17 22:09:42 DEBUG (MainThread) [zhaquirks.tuya] [0x77f3:1:0xef00] Received value [0, 0, 0, 100] for attribute 0x0204 (command 0x0002) 2022-01-17 22:09:42 INFO (MainThread) [ts0601_temperature] toy3375 516, 100 2022-01-17 22:09:42 INFO (MainThread) [ts0601_temperature] toy3375 batt, 100
Enable debug logs - if you didn't that already:
logger:
default: info
logs:
homeassistant.components.zha: debug
zigpy: debug
zhaquirks: debug
Place that file in zha_custom_quirks ts0601_temperature.py.zip Restart HA. Remove and pair device. Try, and if have errors attach here whole, I mean WHOLE, HA log as a file.
@toy3375
unk_model means that device wasn't properly initialized. You need to remove it and add again. Maybe after HA restart.
Your device sends those attributes:
2022-01-21 19:19:08 DEBUG (MainThread) [zhaquirks.tuya] [0xc1f7:1:0xef00] Received value [0] for attribute 0x0409 (command 0x0002)
2022-01-21 19:19:08 DEBUG (MainThread) [zhaquirks.tuya] [0xc1f7:1:0xef00] Received value [0, 0, 1, 134] for attribute 0x020a (command 0x0002)
2022-01-21 19:19:08 DEBUG (MainThread) [zhaquirks.tuya] [0xc1f7:1:0xef00] Received value [0, 0, 0, 0] for attribute 0x020b (command 0x0002)
2022-01-21 19:19:08 DEBUG (MainThread) [zhaquirks.tuya] [0xc1f7:1:0xef00] Received value [0, 0, 0, 60] for attribute 0x020c (command 0x0002)
2022-01-21 19:19:08 DEBUG (MainThread) [zhaquirks.tuya] [0xc1f7:1:0xef00] Received value [0, 0, 0, 20] for attribute 0x020d (command 0x0002)
2022-01-21 19:19:08 DEBUG (MainThread) [zhaquirks.tuya] [0xc1f7:1:0xef00] Received value [0, 0, 0, 120] for attribute 0x0211 (command 0x0002)
2022-01-21 19:19:08 DEBUG (MainThread) [zhaquirks.tuya] [0xc1f7:1:0xef00] Received value [0, 0, 0, 120] for attribute 0x0212 (command 0x0002)
2022-01-21 19:19:08 DEBUG (MainThread) [zhaquirks.tuya] [0xc1f7:1:0xef00] Received value [0, 0, 0, 6] for attribute 0x0213 (command 0x0002)
2022-01-21 19:19:09 DEBUG (MainThread) [zhaquirks.tuya] [0xc1f7:1:0xef00] Received value [0, 0, 0, 6] for attribute 0x0214 (command 0x0002)
2022-01-21 19:19:19 DEBUG (MainThread) [zhaquirks.tuya] [0xc1f7:1:0xef00] Received value [0, 0, 0, 214] for attribute 0x0201 (command 0x0002)
2022-01-21 19:19:19 ERROR (MainThread) [zigpy_deconz.uart] Unexpected error handling the frame: 'measured_value'
2022-01-21 19:19:19 DEBUG (MainThread) [zhaquirks.tuya] [0xc1f7:1:0xef00] Received value [0, 0, 0, 51] for attribute 0x0202 (command 0x0002)
2022-01-21 19:19:19 ERROR (MainThread) [zigpy_deconz.uart] Unexpected error handling the frame: 'measured_value'
2022-01-21 19:19:19 DEBUG (MainThread) [zhaquirks.tuya] [0xc1f7:1:0xef00] Received value [0, 0, 0, 100] for attribute 0x0204 (command 0x0002)
0x0204 look like battery 0x0201 temperature 0x0202 humidity It should work for 99.9%
That error for "measured_value" is strange. Which HA version do you use?? First repair it since quirk wasn't properly loaded.
Ok. At first i deleted the Device then i restarted HA. After few minutes i added Device again. Now i see the battery stats and on ZigBeee device the Wifi Signal is on. But i don´t see Temp and Humi. here some photos and Log file.
i found in the Log:
2022-01-23 09:59:17 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.zha entity: sensor.tze200_locansqn_ts0601_23e48c55_power 2022-01-23 09:59:17 DEBUG (MainThread) [zigpy.appdb] Error handling '_unsupported_attribute_added' event with (a4:c1:38:92:55:8c:e4:23, 1, 1029, 0) params: FOREIGN KEY constraint failed 2022-01-23 09:59:17 DEBUG (MainThread) [zigpy.appdb] Error handling '_unsupported_attribute_added' event with (a4:c1:38:92:55:8c:e4:23, 1, 1026, 0) params: FOREIGN KEY constraint failed 2022-01-23 09:59:17 DEBUG (MainThread) [zigpy_deconz.uart] Frame received: 0x1c4c000c00050002f310ffc3 2022-01-23 09:59:17 DEBUG (MainThread) [zigpy.appdb] Error handling '_unsupported_attribute_added' event with (a4:c1:38:92:55:8c:e4:23, 1, 1, 32) params: FOREIGN KEY constraint failed 2022-01-23 09:59:17 DEBUG (MainThread) [zigpy.appdb] Error handling '_unsupported_attribute_added' event with (a4:c1:38:92:55:8c:e4:23, 1, 1, 33) params: FOREIGN KEY constraint failed 2022-01-23 09:59:24 DEBUG (MainThread) [zigpy.zcl] [0x10f3:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=199, command_id=514, function=0, data=[4, 0, 0, 0, 67])] 2022-01-23 09:59:24 DEBUG (MainThread) [zhaquirks.tuya] [0x10f3:1:0xef00] Received value [0, 0, 0, 67] for attribute 0x0202 (command 0x0002) 2022-01-23 09:59:24 ERROR (MainThread) [zigpy_deconz.uart] Unexpected error handling the frame: 'measured_value' address_mode=ADDRESS_MODE.NWK address=0x10f3>, 1, 260, 61184, b'\t.\x02\x00\xc6\x01\x02\x00\x04\x00\x00\x00\xdb', 0, 175, 215, 26, 166, 7, 0, -67] 2022-01-23 09:59:24 DEBUG (MainThread) [zigpy.zcl] [0x10f3:1:0xef00] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False> manufacturer=None tsn=46 command_id=2> 2022-01-23 09:59:24 DEBUG (MainThread) [zigpy.zcl] [0x10f3:1:0xef00] ZCL request 0x0002: [Command(status=0, tsn=198, command_id=513, function=0, data=[4, 0, 0, 0, 219])] 2022-01-23 09:59:24 DEBUG (MainThread) [zhaquirks.tuya] [0x10f3:1:0xef00] Received value [0, 0, 0, 219] for attribute 0x0201 (command 0x0002) 2022-01-23 09:59:24 ERROR (MainThread) [zigpy_deconz.uart] Unexpected error handling the frame: 'measured_value'
After reload ZHA , it founds Temp and Humi without values.
Code was written with a new approach, but that should not be a problem here, since you have newest HA version. Nevertheless here's same code rewritten in the older approach. Replace and test it. HA restart it's a minimum - best is to re-pair device. ts0601_temperature.py.zip
YEAH.. looks good
- Remove Tuya Device
- Replace File
- Repair Device ( only Battery shown )
- Reload Intergration ( Temp & Humi avaible )
and now the Bonus-Level. Any Idea for the Clock ( Time ) ? :)
and now the Bonus-Level. Any Idea for the Clock ( Time ) ? :)
You think you will ever wanna to get that from the device? Here's a list of your attributes. You need to check which is what, then everything is possible. https://github.com/zigpy/zha-device-handlers/issues/1286#issuecomment-1019375279
BTW once paired device should sync wireless with HA time.
The Device displays the wrong time . I paired now 3 devices and every device has the wrong time or after restart only 00:00:00 00/00.
Try version below. Time offset wasn't set, but I see that your device is making a request for time update. Device MUST ask for time update - there's no possibility to force it. Replace, Restart, Re-pair ts0601_temperature.py.zip
There´s a new error in the Log:
2022-01-24 18:04:51 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:04:52 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:04:53 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:05:03 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:05:03 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:05:03 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:05:14 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:05:14 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Received value [2] for attribute 0x040f (command 0x0002) 2022-01-24 18:05:14 ERROR (MainThread) [zigpy.device] Failed to parse message (b'098402003901') on cluster 61184, because Data is too short to contain 2 bytes 2022-01-24 18:05:25 ERROR (MainThread) [zigpy.device] Failed to parse message (b'098502005b01') on cluster 61184, because Data is too short to contain 2 bytes 2022-01-24 18:05:35 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:05:35 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:05:35 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:05:35 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:05:35 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:05:36 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:05:36 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:05:36 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:05:36 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:05:36 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:05:36 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:05:36 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:05:37 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:05:37 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:05:47 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:05:47 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:05:48 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:05:48 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:05:48 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:05:48 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:05:48 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:05:48 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:05:48 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:05:48 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:05:49 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:05:49 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:05:49 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:05:50 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:06:10 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Received value [0] for attribute 0x0409 (command 0x0002) 2022-01-24 18:06:11 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Received value [0, 0, 1, 134] for attribute 0x020a (command 0x0002) 2022-01-24 18:06:11 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Received value [0, 0, 0, 0] for attribute 0x020b (command 0x0002) 2022-01-24 18:06:11 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Received value [0, 0, 0, 60] for attribute 0x020c (command 0x0002) 2022-01-24 18:06:11 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Received value [0, 0, 0, 20] for attribute 0x020d (command 0x0002) 2022-01-24 18:06:11 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Received value [0, 0, 0, 120] for attribute 0x0211 (command 0x0002) 2022-01-24 18:06:11 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Received value [0, 0, 0, 120] for attribute 0x0212 (command 0x0002) 2022-01-24 18:06:11 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Received value [0, 0, 0, 6] for attribute 0x0213 (command 0x0002) 2022-01-24 18:06:11 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Received value [0, 0, 0, 6] for attribute 0x0214 (command 0x0002) 2022-01-24 18:06:12 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:06:12 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Received value [0, 0, 0, 220] for attribute 0x0201 (command 0x0002) 2022-01-24 18:06:12 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Received value [0, 0, 0, 58] for attribute 0x0202 (command 0x0002) 2022-01-24 18:06:13 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:06:13 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:06:13 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:06:14 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:06:15 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:06:16 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:06:18 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:06:19 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:06:20 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:06:21 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:07:24 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Received value [0] for attribute 0x0409 (command 0x0002) 2022-01-24 18:07:24 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Received value [0, 0, 1, 134] for attribute 0x020a (command 0x0002) 2022-01-24 18:07:24 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Received value [0, 0, 0, 0] for attribute 0x020b (command 0x0002) 2022-01-24 18:07:24 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Received value [0, 0, 0, 60] for attribute 0x020c (command 0x0002) 2022-01-24 18:07:24 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Received value [0, 0, 0, 20] for attribute 0x020d (command 0x0002) 2022-01-24 18:07:24 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Received value [0, 0, 0, 120] for attribute 0x0211 (command 0x0002) 2022-01-24 18:07:24 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Received value [0, 0, 0, 120] for attribute 0x0212 (command 0x0002) 2022-01-24 18:07:24 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Received value [0, 0, 0, 6] for attribute 0x0213 (command 0x0002) 2022-01-24 18:07:25 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Received value [0, 0, 0, 6] for attribute 0x0214 (command 0x0002) 2022-01-24 18:07:25 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:07:25 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Received value [0, 0, 0, 222] for attribute 0x0201 (command 0x0002) 2022-01-24 18:07:35 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Received value [0, 0, 0, 57] for attribute 0x0202 (command 0x0002) 2022-01-24 18:07:46 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:07:46 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:07:46 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:07:46 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:07:46 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:07:46 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:07:46 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:07:57 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:07:57 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024) 2022-01-24 18:07:57 DEBUG (MainThread) [zhaquirks.tuya] [0x0c76:1:0xef00] Got set time request (command 0x0024)
First, @jacekk015 thatnks for all the work here, i just got one of these devices and thought i was out of luck. I have the same results as @toy3375. I am wondering if could be possible to change the temperature units on the device itself to F. The limited documentation said it could be done though their hub but im not seeing a way via HA
@jbmfg
could be possible to change the temperature units on the device itself to F
Probably yes. You just need to tell me which attribute is responsible for the unit change.
These are the attributes i see for the temperature sensor:
state_class: measurement unit_of_measurement: °F device_class: temperature
The units are F in the HA UI but on the device itself theyre still C
@jbmfg I mean Zigbee attribute from the DEBUG logs.
Well , I try set some to F or to 1 in HA UI , but I don't know how to set attributes.
Time cluster don't send Value too..
Tomorrow I will receive a TUYA Gateway. I will try to get some data from there..
yesterday i received my Tuya Mini Gateway.
i paired the Device with it .
It sets the time correctly and activates the Temp and Humi Sensor .
In Tuya Smart App you can change the Temp from C to F:
My Workaround for now: (Maybe for @jbmfg too )
- Pair device to Tuya Gateway
- set Device to C or F , wait for current Time.
- then pair back to ZHA
a big Thank you for your help , @jacekk015 .
Not sure what you did, but there's an attribute that changes value.
2022-01-28 07:45:39 DEBUG (MainThread) [zhaquirks.tuya] [0x7dd0:1:0xef00] Received value [1] for attribute 0x040f (command 0x0002)
2022-01-28 08:08:15 DEBUG (MainThread) [zhaquirks.tuya] [0x492a:1:0xef00] Received value [2] for attribute 0x040f (command 0x0002)
It's possible that 0x040f is responsible for the C/F setting. Later I will modify the code and add that attribute, so you will have the possibility to check it.
Time setting is strange. Actually we never need to do anything in code because Tuya code in ZHA managaes Time request itself.
Here were are:
i did some research with the TUYA Gateway. i found most attributes but the Time is still not working in ZHA. The Workaround is semigood . The Device Clock doesnt Sync after repairing to ZHA. Time after few hours begin to "running away"...
Here the results :
Received value [0, 0, 0, 87] for attribute 0x0204 (command 0x0002) // Current Battery power , Value = 87% battery capacity
Received value [0, 0, 0, 250] for attribute 0x0201 (command 0x0002) // Current Temp in C° , Value / 10 = 25,0 C°
Received value [0, 0, 0, 54] for attribute 0x0202 (command 0x0002) // Current Humidity in % , Value = 54%
Received value [0, 0, 0, 254] for attribute 0x020a (command 0x0002) // Max. Temp Alarm , Value / 10 = 25,4 C° , After override Attribute 40E change to: Received value [1] for attribute 0x040e (command 0x0002) , see below
Received value [0, 0, 0, 154] for attribute 0x020b (command 0x0002) // Min. Temp Alarm , Value / 10 = 15,4 C° , After underride Attribute 40E change to: Received value [0] for attribute 0x040e (command 0x0002) , see below
Received value [0, 0, 0, 61] for attribute 0x020c (command 0x0002) // max. Humidity Alarm , Value = 61% max. Humidity
Received value [0, 0, 0, 21] for attribute 0x020d (command 0x0002) // min. Humidity Alarm , Vakue = 21% min. Humidity
Received value [0, 0, 0, 6] for attribute 0x0213 (command 0x0002) // Sensitivity temp , Value = 6 / 2 = 3 C° ( Settings Tuya default 3C° )
Received value [0, 0, 0, 3] for attribute 0x0214 (command 0x0002) // Sensitivity humidity , Value = 3% ( Settings Tuya default 3% )
Received value [0, 0, 0, 120] for attribute 0x0211 (command 0x0002) // Report Temperature , Value = 120 min ( Settings Tuya default 120 Min. )
Received value [0, 0, 0, 120] for attribute 0x0212 (command 0x0002) // Report Humidity , Value = 120 min ( Settings Tuya default 120 Min. )
Received value [1] for attribute 0x0409 (command 0x0002) // change C to F 0=C 1=F
Received value [1] for attribute 0x040E (command 0x0002) // alarm Temp 0 = underride , 1 = overide , 2 = all is fine :)
Received value [1] for attribute 0x040F (command 0x0002) // alarm Humidity 0 = underride , 1 = overide , 2 = all is fine :)
This device should be very similar (if not the same) as _TZE200_lve3dvpy The clock synchronization should happen on Tuya request command 0x24, same way as for Tuya thermostats and TRVs