-
Notifications
You must be signed in to change notification settings - Fork 731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Device Support Request] _TZ3000_402vrq2i TS004F Tuya Rotary Button #3738
Comments
First look on the manage Zigbee device from the device card (tre dots right from device reconfigure). Look on signature tab on the last line class if its somthing lik this: Edit: Its loading the default quirk i can see in your posted signature. |
I think its only missing group in cluster so try deleting it in line 90 and restart HA ans see if ZHA is loading the quirk. Edit: |
Thanks @MattWestb , but it's still loading the default quirk. 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": "0x0820",
"input_clusters": [
"0x0000",
"0x0001",
"0x0003",
"0x0004",
"0x1000"
],
"output_clusters": [
"0x0003",
"0x0004",
"0x0005",
"0x0006",
"0x0008",
"0x000a",
"0x0019",
"0x1000"
]
}
},
"manufacturer": "_TZ3000_402vrq2i",
"model": "TS004F",
"class": "zhaquirks.tuya.ts004f.TuyaSmartRemote004F"
} Config.yaml:zha:
zigpy_config:
database_path: /config/zigbee.db
enable_quirks: true
custom_quirks_path: /config/zha_quirks/ Updated quirk:# cat config/zha_quirks/ts004f.py
"""Tuya TS004F devices."""
from __future__ import annotations
from zigpy.profiles import zha
from zigpy.zcl.clusters.general import (
Basic,
Groups,
Identify,
LevelControl,
OnOff,
Ota,
PowerConfiguration,
Scenes,
Time,
)
from zigpy.zcl.clusters.lighting import Color
from zigpy.zcl.clusters.lightlink import LightLink
from zhaquirks.const import (
ALT_SHORT_PRESS,
BUTTON,
BUTTON_1,
BUTTON_2,
BUTTON_3,
BUTTON_4,
CLUSTER_ID,
COMMAND,
COMMAND_MOVE,
COMMAND_MOVE_SATURATION,
COMMAND_OFF,
COMMAND_ON,
COMMAND_STEP,
COMMAND_STOP,
COMMAND_STOP_MOVE_STEP,
COMMAND_TOGGLE,
DEVICE_TYPE,
DIM_DOWN,
DIM_UP,
DOUBLE_PRESS,
ENDPOINT_ID,
ENDPOINTS,
INPUT_CLUSTERS,
LEFT,
LONG_PRESS,
LONG_RELEASE,
MODEL,
MODELS_INFO,
OUTPUT_CLUSTERS,
PARAMS,
PROFILE_ID,
RIGHT,
ROTATED,
ROTATED_FAST,
ROTATED_SLOW,
SHORT_PRESS,
TURN_OFF,
TURN_ON,
)
from zhaquirks.tuya import (
EnchantedDevice,
TuyaNoBindPowerConfigurationCluster,
TuyaSmartRemoteOnOffCluster,
TuyaZBExternalSwitchTypeCluster,
)
class TuyaSmartRemote004FROK(EnchantedDevice):
"""Tuya Smart (rotating) Knob device."""
signature = {
# "node_descriptor": "NodeDescriptor(byte1=2, byte2=64, mac_capability_flags=128, manufacturer_code=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=0, *allocate_address=True, *complex_descriptor_available=False, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False, *is_valid=True, *logical_type=<LogicalType.EndDevice: 2>, *user_descriptor_available=False)",
# SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=260, device_version=1, input_clusters=[0, 1, 3, 4, 6, 4096], output_clusters=[25, 10, 3, 4, 5, 6, 8, 4096])
MODELS_INFO: [
("_TZ3000_4fjiwweb", "TS004F"),
("_TZ3000_uri7ongn", "TS004F"),
("_TZ3000_ixla93vd", "TS004F"),
("_TZ3000_qja6nq5z", "TS004F"),
("_TZ3000_csflgqj2", "TS004F"),
("_TZ3000_abrsvsou", "TS004F"),
("_TZ3000_402vrq2i", "TS004F"),
],
ENDPOINTS: {
1: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.DIMMER_SWITCH,
INPUT_CLUSTERS: [
Basic.cluster_id,
PowerConfiguration.cluster_id,
Identify.cluster_id,
OnOff.cluster_id,
LightLink.cluster_id,
],
OUTPUT_CLUSTERS: [
Ota.cluster_id,
Time.cluster_id,
Identify.cluster_id,
Groups.cluster_id,
Scenes.cluster_id,
OnOff.cluster_id,
LevelControl.cluster_id,
LightLink.cluster_id,
],
},
},
}
replacement = {
ENDPOINTS: {
1: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.NON_COLOR_CONTROLLER,
INPUT_CLUSTERS: [
Basic.cluster_id,
TuyaNoBindPowerConfigurationCluster,
Identify.cluster_id,
LightLink.cluster_id,
],
OUTPUT_CLUSTERS: [
Ota.cluster_id,
Time.cluster_id,
Identify.cluster_id,
Groups.cluster_id,
Scenes.cluster_id,
TuyaSmartRemoteOnOffCluster,
LevelControl.cluster_id,
Color.cluster_id,
LightLink.cluster_id,
],
},
},
}
device_automation_triggers = {
(SHORT_PRESS, BUTTON): {COMMAND: COMMAND_TOGGLE, ENDPOINT_ID: 1, CLUSTER_ID: 6},
(LONG_RELEASE, BUTTON): {
COMMAND: COMMAND_STOP_MOVE_STEP,
ENDPOINT_ID: 1,
CLUSTER_ID: 768,
},
(LONG_PRESS, BUTTON): {
COMMAND: COMMAND_MOVE_SATURATION,
ENDPOINT_ID: 1,
CLUSTER_ID: 768,
PARAMS: {"move_mode": 1},
},
(ROTATED_SLOW, RIGHT): {
COMMAND: COMMAND_STEP,
ENDPOINT_ID: 1,
CLUSTER_ID: 8,
PARAMS: {"step_mode": 0, "step_size": 13},
},
(ROTATED_SLOW, LEFT): {
COMMAND: COMMAND_STEP,
ENDPOINT_ID: 1,
CLUSTER_ID: 8,
PARAMS: {"step_mode": 1, "step_size": 13},
},
(ROTATED_FAST, RIGHT): {
COMMAND: COMMAND_STEP,
CLUSTER_ID: 8,
ENDPOINT_ID: 1,
PARAMS: {"step_mode": 0, "step_size": 37},
},
(ROTATED_FAST, LEFT): {
COMMAND: COMMAND_STEP,
CLUSTER_ID: 8,
ENDPOINT_ID: 1,
PARAMS: {"step_mode": 1, "step_size": 37},
},
(SHORT_PRESS, BUTTON_1): {ENDPOINT_ID: 1, COMMAND: SHORT_PRESS},
(LONG_PRESS, BUTTON_1): {ENDPOINT_ID: 1, COMMAND: LONG_PRESS},
(DOUBLE_PRESS, BUTTON_1): {ENDPOINT_ID: 1, COMMAND: DOUBLE_PRESS},
(ROTATED, RIGHT): {
COMMAND: RIGHT,
ENDPOINT_ID: 1,
CLUSTER_ID: 6,
},
(ROTATED, LEFT): {
COMMAND: LEFT,
ENDPOINT_ID: 1,
CLUSTER_ID: 6,
},
}
class TuyaSmartRemote004FDMS(EnchantedDevice):
"""Tuya 4 btton dimmer switch / remote device."""
signature = {
# "node_descriptor": "NodeDescriptor(byte1=2, byte2=64, mac_capability_flags=128, manufacturer_code=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=0, *allocate_address=True, *complex_descriptor_available=False, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False, *is_valid=True, *logical_type=<LogicalType.EndDevice: 2>, *user_descriptor_available=False)",
# SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=260, device_version=1, input_clusters=[0, 1, 3, 4, 6, 4096], output_clusters=[25, 10, 3, 4, 5, 6, 8, 4096])
MODELS_INFO: [
("_TZ3000_xabckq1v", "TS004F"),
("_TZ3000_czuyt8lz", "TS004F"),
("_TZ3000_b3mgfu0d", "TS004F"),
],
ENDPOINTS: {
1: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.DIMMER_SWITCH,
INPUT_CLUSTERS: [
Basic.cluster_id,
PowerConfiguration.cluster_id,
Identify.cluster_id,
Groups.cluster_id,
OnOff.cluster_id,
LightLink.cluster_id,
],
OUTPUT_CLUSTERS: [
Ota.cluster_id,
Time.cluster_id,
Identify.cluster_id,
Groups.cluster_id,
Scenes.cluster_id,
OnOff.cluster_id,
LevelControl.cluster_id,
LightLink.cluster_id,
],
},
},
}
replacement = {
ENDPOINTS: {
1: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.NON_COLOR_CONTROLLER,
INPUT_CLUSTERS: [
Basic.cluster_id,
TuyaNoBindPowerConfigurationCluster,
Identify.cluster_id,
Groups.cluster_id, # Is needed for adding group then binding is not working.
LightLink.cluster_id,
],
OUTPUT_CLUSTERS: [
Ota.cluster_id,
Time.cluster_id,
Identify.cluster_id,
Groups.cluster_id,
Scenes.cluster_id,
TuyaSmartRemoteOnOffCluster,
LevelControl.cluster_id,
Color.cluster_id,
LightLink.cluster_id,
],
},
2: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.NON_COLOR_CONTROLLER,
INPUT_CLUSTERS: [
TuyaSmartRemoteOnOffCluster,
],
OUTPUT_CLUSTERS: [],
},
3: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.NON_COLOR_CONTROLLER,
INPUT_CLUSTERS: [
TuyaSmartRemoteOnOffCluster,
],
OUTPUT_CLUSTERS: [],
},
4: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.NON_COLOR_CONTROLLER,
INPUT_CLUSTERS: [
TuyaSmartRemoteOnOffCluster,
],
OUTPUT_CLUSTERS: [],
},
},
}
device_automation_triggers = {
(SHORT_PRESS, TURN_ON): {COMMAND: COMMAND_ON, CLUSTER_ID: 6, ENDPOINT_ID: 1},
(SHORT_PRESS, TURN_OFF): {COMMAND: COMMAND_OFF, CLUSTER_ID: 6, ENDPOINT_ID: 1},
(SHORT_PRESS, DIM_UP): {
COMMAND: COMMAND_STEP,
CLUSTER_ID: 8,
ENDPOINT_ID: 1,
PARAMS: {"step_mode": 0},
},
(LONG_PRESS, DIM_UP): {
COMMAND: COMMAND_MOVE,
CLUSTER_ID: 8,
ENDPOINT_ID: 1,
PARAMS: {"move_mode": 0},
},
(SHORT_PRESS, DIM_DOWN): {
COMMAND: COMMAND_STEP,
CLUSTER_ID: 8,
ENDPOINT_ID: 1,
PARAMS: {"step_mode": 1},
},
(LONG_PRESS, DIM_DOWN): {
COMMAND: COMMAND_MOVE,
CLUSTER_ID: 8,
ENDPOINT_ID: 1,
PARAMS: {"move_mode": 1},
},
(LONG_RELEASE, DIM_DOWN): {
COMMAND: COMMAND_STOP,
CLUSTER_ID: 8,
ENDPOINT_ID: 1,
},
(SHORT_PRESS, BUTTON_1): {ENDPOINT_ID: 1, COMMAND: SHORT_PRESS},
(LONG_PRESS, BUTTON_1): {ENDPOINT_ID: 1, COMMAND: LONG_PRESS},
(DOUBLE_PRESS, BUTTON_1): {ENDPOINT_ID: 1, COMMAND: DOUBLE_PRESS},
(SHORT_PRESS, BUTTON_2): {ENDPOINT_ID: 2, COMMAND: SHORT_PRESS},
(LONG_PRESS, BUTTON_2): {ENDPOINT_ID: 2, COMMAND: LONG_PRESS},
(DOUBLE_PRESS, BUTTON_2): {ENDPOINT_ID: 2, COMMAND: DOUBLE_PRESS},
(SHORT_PRESS, BUTTON_3): {ENDPOINT_ID: 3, COMMAND: SHORT_PRESS},
(LONG_PRESS, BUTTON_3): {ENDPOINT_ID: 3, COMMAND: LONG_PRESS},
(DOUBLE_PRESS, BUTTON_3): {ENDPOINT_ID: 3, COMMAND: DOUBLE_PRESS},
(SHORT_PRESS, BUTTON_4): {ENDPOINT_ID: 4, COMMAND: SHORT_PRESS},
(LONG_PRESS, BUTTON_4): {ENDPOINT_ID: 4, COMMAND: LONG_PRESS},
(DOUBLE_PRESS, BUTTON_4): {ENDPOINT_ID: 4, COMMAND: DOUBLE_PRESS},
}
class TuyaSmartRemote004FSK(EnchantedDevice):
"""Tuya Smart (Single) Knob device."""
signature = {
# "node_descriptor": "NodeDescriptor(byte1=2, byte2=64, mac_capability_flags=128, manufacturer_code=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=0, *allocate_address=True, *complex_descriptor_available=False, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False, *is_valid=True, *logical_type=<LogicalType.EndDevice: 2>, *user_descriptor_available=False)",
# SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=260, device_version=1, input_clusters=[0, 1, 3, 4, 6, 4096, 57345], output_clusters=[25, 10, 3, 4, 6, 8, 4096])
MODELS_INFO: [
("_TZ3000_kjfzuycl", "TS004F"),
("_TZ3000_ja5osu5g", "TS004F"),
],
ENDPOINTS: {
1: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.DIMMER_SWITCH,
INPUT_CLUSTERS: [
Basic.cluster_id,
PowerConfiguration.cluster_id,
Identify.cluster_id,
Groups.cluster_id,
OnOff.cluster_id,
LightLink.cluster_id,
TuyaZBExternalSwitchTypeCluster.cluster_id,
],
OUTPUT_CLUSTERS: [
Ota.cluster_id,
Time.cluster_id,
Identify.cluster_id,
Groups.cluster_id,
OnOff.cluster_id,
LevelControl.cluster_id,
LightLink.cluster_id,
],
},
},
}
replacement = {
ENDPOINTS: {
1: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.NON_COLOR_CONTROLLER,
INPUT_CLUSTERS: [
Basic.cluster_id,
TuyaNoBindPowerConfigurationCluster,
Identify.cluster_id,
Groups.cluster_id, # Is needed for adding group then binding is not working.
LightLink.cluster_id,
TuyaZBExternalSwitchTypeCluster,
],
OUTPUT_CLUSTERS: [
Ota.cluster_id,
Time.cluster_id,
Identify.cluster_id,
Groups.cluster_id,
TuyaSmartRemoteOnOffCluster,
LevelControl.cluster_id,
Color.cluster_id,
LightLink.cluster_id,
],
},
},
}
device_automation_triggers = {
(SHORT_PRESS, BUTTON): {COMMAND: COMMAND_ON, ENDPOINT_ID: 1, CLUSTER_ID: 6},
(DOUBLE_PRESS, BUTTON): {COMMAND: COMMAND_OFF, ENDPOINT_ID: 1, CLUSTER_ID: 6},
(LONG_PRESS, BUTTON): {COMMAND: COMMAND_STEP, ENDPOINT_ID: 1, CLUSTER_ID: 8},
(LONG_RELEASE, BUTTON): {COMMAND: COMMAND_STOP, ENDPOINT_ID: 1, CLUSTER_ID: 8},
(ALT_SHORT_PRESS, BUTTON): {
ENDPOINT_ID: 1,
CLUSTER_ID: 8,
PARAMS: {
"transition_time": 1,
"options_mask": None,
"options_override": None,
},
},
(SHORT_PRESS, BUTTON_1): {ENDPOINT_ID: 1, COMMAND: SHORT_PRESS},
(LONG_PRESS, BUTTON_1): {ENDPOINT_ID: 1, COMMAND: LONG_PRESS},
(DOUBLE_PRESS, BUTTON_1): {ENDPOINT_ID: 1, COMMAND: DOUBLE_PRESS},
}
class TuyaSmartRemote004FSK_v2(TuyaSmartRemote004FSK):
"""Tuya Smart (Single) Knob device."""
signature = {
# "node_descriptor": "NodeDescriptor(byte1=2, byte2=64, mac_capability_flags=128, manufacturer_code=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=0, *allocate_address=True, *complex_descriptor_available=False, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False, *is_valid=True, *logical_type=<LogicalType.EndDevice: 2>, *user_descriptor_available=False)",
# SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=260, device_version=1, input_clusters=[0, 1, 3, 4, 6, 4096, 57345], output_clusters=[25, 10, 3, 4, 6, 8, 4096])
MODELS_INFO: [
("_TZ3000_ja5osu5g", "TS004F"),
],
ENDPOINTS: {
1: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.ON_OFF_SWITCH,
INPUT_CLUSTERS: [
Basic.cluster_id,
PowerConfiguration.cluster_id,
Identify.cluster_id,
Groups.cluster_id,
OnOff.cluster_id,
LightLink.cluster_id,
TuyaZBExternalSwitchTypeCluster.cluster_id,
],
OUTPUT_CLUSTERS: [
Ota.cluster_id,
Time.cluster_id,
Identify.cluster_id,
Groups.cluster_id,
OnOff.cluster_id,
LevelControl.cluster_id,
LightLink.cluster_id,
],
},
},
}
class TuyaSmartRemote004F(EnchantedDevice):
"""Tuya 4-button New version remote device."""
signature = {
# "node_descriptor": "NodeDescriptor(byte1=2, byte2=64, mac_capability_flags=128, manufacturer_code=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=0, *allocate_address=True, *complex_descriptor_available=False, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False, *is_valid=True, *logical_type=<LogicalType.EndDevice: 2>, *user_descriptor_available=False)",
# SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=260, device_version=1, input_clusters=[0, 1, 3, 4, 6, 4096], output_clusters=[25, 10, 3, 4, 5, 6, 8, 4096])
MODEL: "TS004F",
ENDPOINTS: {
1: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.DIMMER_SWITCH,
INPUT_CLUSTERS: [
Basic.cluster_id,
PowerConfiguration.cluster_id,
Identify.cluster_id,
Groups.cluster_id,
OnOff.cluster_id,
LightLink.cluster_id,
],
OUTPUT_CLUSTERS: [
Ota.cluster_id,
Time.cluster_id,
Identify.cluster_id,
Groups.cluster_id,
Scenes.cluster_id,
OnOff.cluster_id,
LevelControl.cluster_id,
LightLink.cluster_id,
],
},
},
}
replacement = {
ENDPOINTS: {
1: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.NON_COLOR_CONTROLLER,
INPUT_CLUSTERS: [
Basic.cluster_id,
TuyaNoBindPowerConfigurationCluster,
Identify.cluster_id,
Groups.cluster_id, # Is needed for adding group then binding is not working.
LightLink.cluster_id,
],
OUTPUT_CLUSTERS: [
Ota.cluster_id,
Time.cluster_id,
Identify.cluster_id,
Groups.cluster_id,
Scenes.cluster_id,
TuyaSmartRemoteOnOffCluster,
LevelControl.cluster_id,
LightLink.cluster_id,
],
},
},
}
device_automation_triggers = {
(SHORT_PRESS, TURN_ON): {COMMAND: COMMAND_ON, CLUSTER_ID: 6, ENDPOINT_ID: 1},
(SHORT_PRESS, TURN_OFF): {COMMAND: COMMAND_OFF, CLUSTER_ID: 6, ENDPOINT_ID: 1},
(SHORT_PRESS, DIM_UP): {
COMMAND: COMMAND_STEP,
CLUSTER_ID: 8,
ENDPOINT_ID: 1,
PARAMS: {"step_mode": 0},
},
(LONG_PRESS, DIM_UP): {
COMMAND: COMMAND_MOVE,
CLUSTER_ID: 8,
ENDPOINT_ID: 1,
PARAMS: {"move_mode": 0},
},
(SHORT_PRESS, DIM_DOWN): {
COMMAND: COMMAND_STEP,
CLUSTER_ID: 8,
ENDPOINT_ID: 1,
PARAMS: {"step_mode": 1},
},
(LONG_PRESS, DIM_DOWN): {
COMMAND: COMMAND_MOVE,
CLUSTER_ID: 8,
ENDPOINT_ID: 1,
PARAMS: {"move_mode": 1},
},
(LONG_RELEASE, DIM_DOWN): {
COMMAND: COMMAND_STOP,
CLUSTER_ID: 8,
ENDPOINT_ID: 1,
},
} |
+1 for this, received this rotary knob and cannot get it to operate correctly. Or load a quirk |
same issue over on zigbee2mqtt/issues Koenkk/zigbee2mqtt#23543 |
I can make it work somewhat by directly working with Single Press
Right turn
Left turn
Fast right turn
Fast left turn
Triple click
I did not get any events for double click, press release (long press), hold and turn. |
Double click is only supported in scene mode and normally being changed by setting the attribute but is not possible if the quirk is not loaded. But if triple clicking fast (real fast not slow motion) it changing mode nd you is getting different events. For getting custom quirk working try the suggested change and if not working look if its more cluster / endpoints changed and implanting it. |
Am just spending some time comparing the Differences
_TZ3000_abrsvsou has an array of additional attributes in the 0x300 cluster: Attributes"unsupported_attributes": []
},
"0x0300": {
"endpoint_attribute": "light_color",
"attributes": {
"0xfffd": {
"attribute": "ZCLAttributeDef(id=0xFFFD, name='cluster_revision', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=True, is_manufacturer_specific=False)",
"value": null
},
"0x400a": {
"attribute": "ZCLAttributeDef(id=0x400A, name='color_capabilities', type=<flag 'ColorCapabilities'>, zcl_type=<DataTypeId.map16: 25>, access=<ZCLAttributeAccess.Read: 1>, mandatory=True, is_manufacturer_specific=False)",
"value": null
},
"0x4002": {
"attribute": "ZCLAttributeDef(id=0x4002, name='color_loop_active', type=<class 'zigpy.types.basic.uint8_t'>, zcl_type=<DataTypeId.uint8: 32>, access=<ZCLAttributeAccess.Read|Scene: 17>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x4003": {
"attribute": "ZCLAttributeDef(id=0x4003, name='color_loop_direction', type=<class 'zigpy.types.basic.uint8_t'>, zcl_type=<DataTypeId.uint8: 32>, access=<ZCLAttributeAccess.Read|Scene: 17>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x4005": {
"attribute": "ZCLAttributeDef(id=0x4005, name='color_loop_start_enhanced_hue', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x4006": {
"attribute": "ZCLAttributeDef(id=0x4006, name='color_loop_stored_enhanced_hue', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x4004": {
"attribute": "ZCLAttributeDef(id=0x4004, name='color_loop_time', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read|Scene: 17>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0008": {
"attribute": "ZCLAttributeDef(id=0x0008, name='color_mode', type=<enum 'ColorMode'>, zcl_type=<DataTypeId.enum8: 48>, access=<ZCLAttributeAccess.Read: 1>, mandatory=True, is_manufacturer_specific=False)",
"value": null
},
"0x003c": {
"attribute": "ZCLAttributeDef(id=0x003C, name='color_point_b_intensity', type=<class 'zigpy.types.basic.uint8_t'>, zcl_type=<DataTypeId.uint8: 32>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x003a": {
"attribute": "ZCLAttributeDef(id=0x003A, name='color_point_b_x', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x003b": {
"attribute": "ZCLAttributeDef(id=0x003B, name='color_point_b_y', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0038": {
"attribute": "ZCLAttributeDef(id=0x0038, name='color_point_g_intensity', type=<class 'zigpy.types.basic.uint8_t'>, zcl_type=<DataTypeId.uint8: 32>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0036": {
"attribute": "ZCLAttributeDef(id=0x0036, name='color_point_g_x', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0037": {
"attribute": "ZCLAttributeDef(id=0x0037, name='color_point_g_y', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0034": {
"attribute": "ZCLAttributeDef(id=0x0034, name='color_point_r_intensity', type=<class 'zigpy.types.basic.uint8_t'>, zcl_type=<DataTypeId.uint8: 32>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0032": {
"attribute": "ZCLAttributeDef(id=0x0032, name='color_point_r_x', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0033": {
"attribute": "ZCLAttributeDef(id=0x0033, name='color_point_r_y', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x400c": {
"attribute": "ZCLAttributeDef(id=0x400C, name='color_temp_physical_max', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x400b": {
"attribute": "ZCLAttributeDef(id=0x400B, name='color_temp_physical_min', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0007": {
"attribute": "ZCLAttributeDef(id=0x0007, name='color_temperature', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read|Report|Scene: 25>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0006": {
"attribute": "ZCLAttributeDef(id=0x0006, name='compensation_text', type=<class 'zigpy.types.basic.CharacterString'>, zcl_type=<DataTypeId.string: 66>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x400d": {
"attribute": "ZCLAttributeDef(id=0x400D, name='couple_color_temp_to_level_min', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0000": {
"attribute": "ZCLAttributeDef(id=0x0000, name='current_hue', type=<class 'zigpy.types.basic.uint8_t'>, zcl_type=<DataTypeId.uint8: 32>, access=<ZCLAttributeAccess.Read|Report: 9>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0001": {
"attribute": "ZCLAttributeDef(id=0x0001, name='current_saturation', type=<class 'zigpy.types.basic.uint8_t'>, zcl_type=<DataTypeId.uint8: 32>, access=<ZCLAttributeAccess.Read|Report|Scene: 25>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0003": {
"attribute": "ZCLAttributeDef(id=0x0003, name='current_x', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read|Report|Scene: 25>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0004": {
"attribute": "ZCLAttributeDef(id=0x0004, name='current_y', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read|Report|Scene: 25>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0005": {
"attribute": "ZCLAttributeDef(id=0x0005, name='drift_compensation', type=<enum 'DriftCompensation'>, zcl_type=<DataTypeId.enum8: 48>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x4001": {
"attribute": "ZCLAttributeDef(id=0x4001, name='enhanced_color_mode', type=<enum 'EnhancedColorMode'>, zcl_type=<DataTypeId.enum8: 48>, access=<ZCLAttributeAccess.Read: 1>, mandatory=True, is_manufacturer_specific=False)",
"value": null
},
"0x4000": {
"attribute": "ZCLAttributeDef(id=0x4000, name='enhanced_current_hue', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read|Scene: 17>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0010": {
"attribute": "ZCLAttributeDef(id=0x0010, name='num_primaries', type=<class 'zigpy.types.basic.uint8_t'>, zcl_type=<DataTypeId.uint8: 32>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x000f": {
"attribute": "ZCLAttributeDef(id=0x000F, name='options', type=<flag 'Options'>, zcl_type=<DataTypeId.map8: 24>, access=<ZCLAttributeAccess.Read|Write: 3>, mandatory=True, is_manufacturer_specific=False)",
"value": null
},
"0x0013": {
"attribute": "ZCLAttributeDef(id=0x0013, name='primary1_intensity', type=<class 'zigpy.types.basic.uint8_t'>, zcl_type=<DataTypeId.uint8: 32>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0011": {
"attribute": "ZCLAttributeDef(id=0x0011, name='primary1_x', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0012": {
"attribute": "ZCLAttributeDef(id=0x0012, name='primary1_y', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0017": {
"attribute": "ZCLAttributeDef(id=0x0017, name='primary2_intensity', type=<class 'zigpy.types.basic.uint8_t'>, zcl_type=<DataTypeId.uint8: 32>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0015": {
"attribute": "ZCLAttributeDef(id=0x0015, name='primary2_x', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0016": {
"attribute": "ZCLAttributeDef(id=0x0016, name='primary2_y', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x001b": {
"attribute": "ZCLAttributeDef(id=0x001B, name='primary3_intensity', type=<class 'zigpy.types.basic.uint8_t'>, zcl_type=<DataTypeId.uint8: 32>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0019": {
"attribute": "ZCLAttributeDef(id=0x0019, name='primary3_x', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x001a": {
"attribute": "ZCLAttributeDef(id=0x001A, name='primary3_y', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0022": {
"attribute": "ZCLAttributeDef(id=0x0022, name='primary4_intensity', type=<class 'zigpy.types.basic.uint8_t'>, zcl_type=<DataTypeId.uint8: 32>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0020": {
"attribute": "ZCLAttributeDef(id=0x0020, name='primary4_x', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0021": {
"attribute": "ZCLAttributeDef(id=0x0021, name='primary4_y', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0026": {
"attribute": "ZCLAttributeDef(id=0x0026, name='primary5_intensity', type=<class 'zigpy.types.basic.uint8_t'>, zcl_type=<DataTypeId.uint8: 32>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0024": {
"attribute": "ZCLAttributeDef(id=0x0024, name='primary5_x', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0025": {
"attribute": "ZCLAttributeDef(id=0x0025, name='primary5_y', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x002a": {
"attribute": "ZCLAttributeDef(id=0x002A, name='primary6_intensity', type=<class 'zigpy.types.basic.uint8_t'>, zcl_type=<DataTypeId.uint8: 32>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0028": {
"attribute": "ZCLAttributeDef(id=0x0028, name='primary6_x', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0029": {
"attribute": "ZCLAttributeDef(id=0x0029, name='primary6_y', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0002": {
"attribute": "ZCLAttributeDef(id=0x0002, name='remaining_time', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0xfffe": {
"attribute": "ZCLAttributeDef(id=0xFFFE, name='reporting_status', type=<enum 'AttributeReportingStatus'>, zcl_type=<DataTypeId.enum8: 48>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x4010": {
"attribute": "ZCLAttributeDef(id=0x4010, name='start_up_color_temperature', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read|Write: 3>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0030": {
"attribute": "ZCLAttributeDef(id=0x0030, name='white_point_x', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
},
"0x0031": {
"attribute": "ZCLAttributeDef(id=0x0031, name='white_point_y', type=<class 'zigpy.types.basic.uint16_t'>, zcl_type=<DataTypeId.uint16: 33>, access=<ZCLAttributeAccess.Read: 1>, mandatory=False, is_manufacturer_specific=False)",
"value": null
}
},
"unsupported_attributes": []
}, I find this odd, as this is not a device that could control color. |
First color cluster is being used in tuya TS004F devices (LIDL is using it of color / temperature lights but not in very Zigbee standard way) so is not very strange only tuya Zigbee devices. |
Problem description
Please support Tuya
_TZ3000_402vrq2i
, which is a rotary button, purchased from https://www.aliexpress.us/item/3256807534367914.htmlAs far as I can see, it is identical to
_TZ3000_abrsvsou
, which is already supported in the TuyaSmartRemote004FROK class.I have both, the zha events match.
I tried adding
("_TZ3000_402vrq2i", "TS004F"),
in line 81 and import it as a custom quirk, but I can see the _TZ3000_402vrq2i continues to be handled by theTuyaSmartRemote004F
class, and as a result offers incorrect commands (e.g. TURN OFF and TURN ON instead of Toggle).I'm not sure if this is because of a conflict between the native ZHA quirk and my custom one or for some other reason.
Thanks.
Solution description
This device should be handled by the TuyaSmartRemote004FROK class.
Operations supported:
Screenshots/Video
Screenshots/Video
[Paste/upload your media here]
Device signature
Device signature
Diagnostic information
Diagnostic information
Logs
Logs
Custom quirk
Custom quirk
Additional information
No response
The text was updated successfully, but these errors were encountered: