I recently purchased a THS317-ET-TY from France. It is detected in my Zigbee network as:
IEEE: 8c:65:a3:ff:fe:92:17:19
Nwk: 0x6729
Device Type: EndDevice
LQI: 138
RSSI: Unknown
Last Seen: 2024-10-15T12:22:57
Power Source: Battery or Unknown
and the ‘last seen’ tiestamp does reflect almost current time always, so it does talk to my coordinator (a SONOFF stick)
However, it only ever records a temperature ONCE when I add it, and then never again, even if I put the probe eg into the fridge etc.
Following some other threads i found here and elsewhere, I set up a ZHA quirks file (link at the bottom)
I pointed by HA installation to this file via configuration.yaml:
...
zha:
custom_quirks_path: /config/custom_zha_quirks/tuya
...
I am not sure this path is correct, but it does not result in a error when checking the configuration. If I modify this path to one that does not exist, an error is shown, so that suggests that this path is accepted, even though the config say /config/. while in the file editor it is shown under /homeassistant
In the quirks file I found on the ‘net’, I copied one of the existing classes
to make a new one (line 162 onwards)", with the identifiers for this device:
class OWONTuyaTemperatureHumidtySensor(CustomDevice):
"""OWON Tuya THS317-ET-TY temperature and humidity sensor."""
signature = {
# <SimpleDescriptor endpoint=1 profile=260 device_type=770
# device_version=1
# input_clusters=[0, 1, 3, 1029, 1026, 61183]
# output_clusters=[3, 25]>
MODELS_INFO: [("_TZE200_iq4ygaai", "TS0201")],
ENDPOINTS: {
However, I am not sure whether that is sufficient. I see no place in that quirks file where the other classes describing other TS201 devices are referenced/pointed to. So I hope that defining the class with the identifiers:
MODELS_INFO: [("_TZE200_iq4ygaai", "TS0201")],
is in all that is needed?
Then too, I have no idea whether what is defined in that class is correct for this device.
I am a Zigbee noob, and i don’t know what all the ‘endpoints’, ‘profile’, ‘clusters’ etc all refer to.
To get some more info on the actual device I have, I turned on Zigbee debugging info (also link at the bottom) , but that too is way to cryptic to me…
The device is shown (line 210).
a few points from that
- it shows
"quirk_applied": false,
"quirk_class": "zigpy.device.Device",
"quirk_id": null,
so I gather that the quirks were not used. Not sure whether it simply didn’t find the file, or nothing in it was found to apply to this device?
SO some questions:
a) what do i need to define to make ZHA apply the quirks file
b) what do I need to define in the quirks file for this specific device to make it report temperature data correctly?
c) is there anything else i need to do?
d) any other help appreciated
The files (debuuging info and the quirks file) are here: HomeAssistant