-
Notifications
You must be signed in to change notification settings - Fork 960
Description
Problem description
I closed the other post i made to share an update sorry!
Can connect to zha but does not have any entity's
I have made a Quirk now but all entity's show as unknown
Tuya Smart Home Zigbee 3.0 Thermostatic Valve Radiator Zigbee Thermostat Radiator Zigbee Thermostatic
https://a.aliexpress.com/_EjQMBbm
TS0601
by _TZE200_r5ksy7qo
Connected via Generic Zigbee Coordinator (EZSP)
Firmware: 0x00000043
Zigbee: A4:C1:38:BE:47:2C:14:9B
Zigbee info
Nwk: 0x2e75
Device Type: EndDevice
LQI: Unknown
RSSI: Unknown
Last seen: 2025-12-29T21:28:07
Power source: Battery or Unknown
Solution description
All entity's show as Unknown so I dont know what i am doing wrong
Screenshots/Video
Screenshots/Video
[Paste/upload your media here]
Diagnostics information
zha-01K3E6NVQ6B9JYF3WWRQTNNYGG-_TZE200_r5ksy7qo TS0601-086283cc277199e7e4b115eb7a4c2a43-8.json
Device signature
Device signature
{
"node_descriptor": {
"logical_type": 2,
"complex_descriptor_available": 0,
"user_descriptor_available": 0,
"reserved": 0,
"aps_flags": 0,
"frequency_band": 8,
"mac_capability_flags": 128,
"manufacturer_code": 4417,
"maximum_buffer_size": 66,
"maximum_incoming_transfer_size": 66,
"server_mask": 10752,
"maximum_outgoing_transfer_size": 66,
"descriptor_capability_field": 0
},
"endpoints": {
"1": {
"profile_id": "0x0104",
"device_type": "0x0301",
"input_clusters": [
"0x0000",
"0x0001",
"0x0004",
"0x0005",
"0x0201",
"0x0204"
],
"output_clusters": [
"0x000a",
"0x0019"
]
}
},
"manufacturer": "_TZE200_r5ksy7qo",
"model": "TS0601",
"class": "me168_trv.me168.ME168TRV"
}
Logs
Logs
[Paste the logs here]Custom quirk
Custom quirk
"""Custom Quirk for _TZE200_r5ksy7qo Thermostatic Valve (ME168 TRV)."""
import zigpy.types as t
from zigpy.zcl.clusters.general import (
Basic,
Groups,
Scenes,
Time,
Ota,
)
from zigpy.zcl.clusters.hvac import Thermostat, UserInterface
from zhaquirks import CustomDevice
from zhaquirks.const import (
MODELS_INFO,
ENDPOINTS,
PROFILE_ID,
DEVICE_TYPE,
INPUT_CLUSTERS,
OUTPUT_CLUSTERS,
)
from zhaquirks.tuya.mcu import (
TuyaMCUCluster,
DPToAttributeMapping,
TuyaPowerConfigurationCluster,
)
class ME168Thermostat(TuyaMCUCluster, Thermostat):
"""Custom Thermostat Cluster for ME168 TRV."""
cluster_id = Thermostat.cluster_id
ep_attribute = "thermostat"
# FIXED: Correct attribute name "ctrl_sequence_of_oper"
attributes = Thermostat.attributes.copy()
attributes.update({
0x0000: ("local_temperature", t.int16s, True),
0x0012: ("occupied_heating_setpoint", t.int16s, True),
0x001C: ("system_mode", t.enum8, True),
0x0010: ("local_temperature_calibration", t.int8s, True),
0x001B: ("ctrl_sequence_of_oper", t.enum8, True), # FIXED NAME
0x001E: ("running_mode", t.enum8, True),
})
def __init__(self, endpoint, is_server=True):
super().__init__(endpoint, is_server)
self._skip_configuration = True
# DP → Attribute mappings
self.dp_to_attribute = {
2: DPToAttributeMapping(
"system_mode",
"system_mode",
converter=lambda x: (
Thermostat.SystemMode.Auto if x == 0 else
Thermostat.SystemMode.Heat if x == 1 else
Thermostat.SystemMode.Off
),
),
4: DPToAttributeMapping(
"occupied_heating_setpoint",
"occupied_heating_setpoint",
converter=lambda x: int(x * 10),
),
5: DPToAttributeMapping(
"local_temperature",
"local_temperature",
converter=lambda x: int(x * 10),
),
47: DPToAttributeMapping(
"local_temperature_calibration",
"local_temperature_calibration",
converter=lambda x: int(x),
),
}
# Attribute → DP mappings
self.attribute_to_dp = {
"system_mode": 2,
"occupied_heating_setpoint": 4,
"local_temperature_calibration": 47,
}
# FIX: Provide a safe default so ZHA never crashes
self._update_attribute(0x001B, 0x04) # HEAT_ONLY
class ME168UserInterface(TuyaMCUCluster, UserInterface):
"""Custom User Interface Cluster for Child Lock."""
cluster_id = UserInterface.cluster_id
ep_attribute = "user_interface"
attributes = UserInterface.attributes.copy()
attributes.update({
0x0001: ("keypad_lockout", t.enum8, True),
})
def __init__(self, endpoint, is_server=True):
super().__init__(endpoint, is_server)
self._skip_configuration = True
self.dp_to_attribute = {
7: DPToAttributeMapping(
"keypad_lockout",
"keypad_lockout",
converter=lambda x: (
UserInterface.KeypadLockout.Level_1_lockout
if x else UserInterface.KeypadLockout.No_lockout
),
),
}
self.attribute_to_dp = {
"keypad_lockout": 7,
}
class ME168TRV(CustomDevice):
"""Custom TRV Quirk for _TZE200_r5ksy7qo."""
signature = {
MODELS_INFO: [("_TZE200_r5ksy7qo", "TS0601")],
ENDPOINTS: {
1: {
PROFILE_ID: 0x0104,
DEVICE_TYPE: 0x0051,
INPUT_CLUSTERS: [
0x0000,
0x0004,
0x0005,
0xEF00,
],
OUTPUT_CLUSTERS: [
0x000A,
0x0019,
],
}
},
}
replacement = {
ENDPOINTS: {
1: {
PROFILE_ID: 0x0104,
DEVICE_TYPE: 0x0301,
INPUT_CLUSTERS: [
Basic.cluster_id,
Groups.cluster_id,
Scenes.cluster_id,
ME168Thermostat,
TuyaPowerConfigurationCluster,
ME168UserInterface,
],
OUTPUT_CLUSTERS: [
Time.cluster_id,
Ota.cluster_id,
],
}
}
}Additional information
All entity's show unknown