diff --git a/tests/test_tuya.py b/tests/test_tuya.py index f2b1c5c2bf..29fada7a88 100644 --- a/tests/test_tuya.py +++ b/tests/test_tuya.py @@ -1508,6 +1508,7 @@ async def async_success(*args, **kwargs): (zhaquirks.tuya.ts0041.TuyaSmartRemote0041TI, "_TZ3000_awgcnkrh"), (zhaquirks.tuya.ts0041.TuyaSmartRemote0041TI, "_TZ3400_deyjhapk"), (zhaquirks.tuya.ts0041.TuyaSmartRemote0041TI, "_some_random_manuf"), + (zhaquirks.tuya.ts0041.TuyaSmartRemote0041TIIAS, "_TZ3000_ajsypttg"), (zhaquirks.tuya.ts0041.TuyaSmartRemote0041TO, "_TZ3000_pwgcnkrh"), (zhaquirks.tuya.ts0041.TuyaSmartRemote0041TO, "_TZ3400_leyjhapk"), (zhaquirks.tuya.ts0041.TuyaSmartRemote0041TO, "_some_random_manuf"), diff --git a/zhaquirks/tuya/ts0041.py b/zhaquirks/tuya/ts0041.py index 088080dbe3..8d33cddb08 100644 --- a/zhaquirks/tuya/ts0041.py +++ b/zhaquirks/tuya/ts0041.py @@ -118,6 +118,50 @@ class TuyaSmartRemote0041TI(CustomDevice): } +class TuyaSmartRemote0041TIIAS(CustomDevice): + """Tuya 1-button remote device with time on in and IAS ancillary device type.""" + + signature = { + # SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=1025, device_version=1, input_clusters=[0, 1, 6, 10], output_clusters=[25])) + # Tesla Smart TSL-SEN-BUTTON (_TZ3000_ajsypttg) + MODEL: "TS0041", + ENDPOINTS: { + 1: { + PROFILE_ID: zha.PROFILE_ID, + DEVICE_TYPE: zha.DeviceType.IAS_ANCILLARY_CONTROL, + INPUT_CLUSTERS: [ + Basic.cluster_id, + PowerConfiguration.cluster_id, + OnOff.cluster_id, + Time.cluster_id, + ], + OUTPUT_CLUSTERS: [Ota.cluster_id], + }, + }, + } + replacement = { + ENDPOINTS: { + 1: { + PROFILE_ID: zha.PROFILE_ID, + DEVICE_TYPE: zha.DeviceType.REMOTE_CONTROL, + INPUT_CLUSTERS: [ + Basic.cluster_id, + TuyaNoBindPowerConfigurationCluster, + TuyaSmartRemoteOnOffCluster, + Time.cluster_id, + ], + OUTPUT_CLUSTERS: [Ota.cluster_id], + }, + }, + } + + device_automation_triggers = { + (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 TuyaSmartRemote0041TOPlusA(CustomDevice): """Tuya 1-button remote device with time on out cluster."""