ZHA - Tuya TS0043 3 button remote

Blueprint for the Tuya TS0043 3 button remote. It supports single and double press actions on all 3 buttons.

grafik

blueprint:
  name: ZHA - Tuya TS0043 3 button remote
  description: Automate your Tuya TS0043 3 button remote using
    ZHA events.
  domain: automation
  input:
    tuya_ts0043:
      name: Tuya TS0043 3 button remote
      description: Tuya TS0043 3 button remote to use
      selector:
        device:
          integration: zha
          manufacturer: _TZ3000_bi6lpsew
          model: TS0043
    button_one_single_press:
      name: Button 1 (single press)
      description: Action to run on button 1 single press
      default: []
      selector:
        action: {}
    button_one_double_press:
      name: Button 1 (double press)
      description: Action to run on button 1 double press
      default: []
      selector:
        action: {}
    button_two_single_press:
      name: Button 2 (single press)
      description: Action to run on button 2 single press
      default: []
      selector:
        action: {}
    button_two_double_press:
      name: Button 2 (double press)
      description: Action to run on button 2 double press
      default: []
      selector:
        action: {}
    button_three_single_press:
      name: Button 3 (single press)
      description: Action to run on button 3 single press
      default: []
      selector:
        action: {}
    button_three_double_press:
      name: Button 3 (double press)
      description: Action to run on button 3 double press
      default: []
      selector:
        action: {}
mode: restart
max_exceeded: silent
trigger:
- platform: event
  event_type: zha_event
  event_data:
    device_id: !input 'tuya_ts0043'
action:
  - variables:
      command: '{{ trigger.event.data.command }}'
      endpoint_id: '{{ trigger.event.data.endpoint_id }}'
  - choose:
    - conditions:
        - '{{ command == ''remote_button_short_press'' and endpoint_id == 1 }}'
      sequence: !input 'button_one_single_press'
    - conditions:
        - '{{ command == ''remote_button_double_press'' and endpoint_id == 1 }}'
      sequence: !input 'button_one_double_press'
    - conditions:
        - '{{ command == ''remote_button_short_press'' and endpoint_id == 2 }}'
      sequence: !input 'button_two_single_press'
    - conditions:
        - '{{ command == ''remote_button_double_press'' and endpoint_id == 2 }}'
      sequence: !input 'button_two_double_press'
    - conditions:
        - '{{ command == ''remote_button_short_press'' and endpoint_id == 3 }}'
      sequence: !input 'button_three_single_press'
    - conditions:
        - '{{ command == ''remote_button_double_press'' and endpoint_id == 3 }}'
      sequence: !input 'button_three_double_press'
6 Likes

Thanks for publishing this! Works perfectly for me. I added the long press commands for each button as well and continues to work well in my installation.

blueprint:
  name: ZHA - Tuya TS0043 3 button remote
  description: Automate your Tuya TS0043 3 button remote using
    ZHA events.
  domain: automation
  input:
    tuya_ts0043:
      name: Tuya TS0043 3 button remote
      description: Tuya TS0043 3 button remote to use
      selector:
        device:
          integration: zha
          manufacturer: _TZ3000_bi6lpsew
          model: TS0043
    button_one_single_press:
      name: Button 1 (single press)
      description: Action to run on button 1 single press
      default: []
      selector:
        action: {}
    button_one_double_press:
      name: Button 1 (double press)
      description: Action to run on button 1 double press
      default: []
      selector:
        action: {}
    button_one_long_press:
      name: Button 1 (long press)
      description: Action to run on button 1 long press
      default: []
      selector:
        action: {}
    button_two_single_press:
      name: Button 2 (single press)
      description: Action to run on button 2 single press
      default: []
      selector:
        action: {}
    button_two_double_press:
      name: Button 2 (double press)
      description: Action to run on button 2 double press
      default: []
      selector:
        action: {}
    button_two_long_press:
      name: Button 2 (long press)
      description: Action to run on button 2 long press
      default: []
      selector:
        action: {}
    button_three_single_press:
      name: Button 3 (single press)
      description: Action to run on button 3 single press
      default: []
      selector:
        action: {}
    button_three_double_press:
      name: Button 3 (double press)
      description: Action to run on button 3 double press
      default: []
      selector:
        action: {}
    button_three_long_press:
      name: Button 3 (long press)
      description: Action to run on button 3 long press
      default: []
      selector:
        action: {}
mode: restart
max_exceeded: silent
trigger:
- platform: event
  event_type: zha_event
  event_data:
    device_id: !input 'tuya_ts0043'
action:
  - variables:
      command: '{{ trigger.event.data.command }}'
      endpoint_id: '{{ trigger.event.data.endpoint_id }}'
  - choose:
    - conditions:
        - '{{ command == ''remote_button_short_press'' and endpoint_id == 1 }}'
      sequence: !input 'button_one_single_press'
    - conditions:
        - '{{ command == ''remote_button_double_press'' and endpoint_id == 1 }}'
      sequence: !input 'button_one_double_press'
    - conditions:
        - '{{ command == ''remote_button_long_press'' and endpoint_id == 1 }}'
      sequence: !input 'button_one_long_press'
    - conditions:
        - '{{ command == ''remote_button_short_press'' and endpoint_id == 2 }}'
      sequence: !input 'button_two_single_press'
    - conditions:
        - '{{ command == ''remote_button_double_press'' and endpoint_id == 2 }}'
      sequence: !input 'button_two_double_press'
    - conditions:
        - '{{ command == ''remote_button_long_press'' and endpoint_id == 2 }}'
      sequence: !input 'button_two_long_press'
    - conditions:
        - '{{ command == ''remote_button_short_press'' and endpoint_id == 3 }}'
      sequence: !input 'button_three_single_press'
    - conditions:
        - '{{ command == ''remote_button_double_press'' and endpoint_id == 3 }}'
      sequence: !input 'button_three_double_press'
    - conditions:
        - '{{ command == ''remote_button_long_press'' and endpoint_id == 3 }}'
      sequence: !input 'button_three_long_press'
5 Likes

Excellent integration. I use it with pleasure, but there is a question, and there was no experience of creating this integration on Z2M? I almost do not use ZHA as a control, and I can not find the same project on Z2M, I tried to create it myself, but apparently it’s too early, nothing happens))

im trying to modify this for the 4 button version

blueprint:
  name: ZHA - Tuya TS0044 4 button remote
  description: Automate your Tuya TS0044 4 button remote using
    ZHA events.
  domain: automation
  input:
    tuya_TS0044:
      name: Tuya TS0044 4 button remote
      description: Tuya TS0044 4 button remote to use
      selector:
        device:
          integration: zha
          manufacturer: _TZ3000_ufhtxr59
          model: TS0044
    button_one_single_press:
      name: Button 1 (single press)
      description: Action to run on button 1 single press
      default: []
      selector:
        action: {}
    button_one_double_press:
      name: Button 1 (double press)
      description: Action to run on button 1 double press
      default: []
      selector:
        action: {}
    button_one_long_press:
      name: Button 1 (long press)
      description: Action to run on button 1 long press
      default: []
      selector:
        action: {}
    button_two_single_press:
      name: Button 2 (single press)
      description: Action to run on button 2 single press
      default: []
      selector:
        action: {}
    button_two_double_press:
      name: Button 2 (double press)
      description: Action to run on button 2 double press
      default: []
      selector:
        action: {}
    button_two_long_press:
      name: Button 2 (long press)
      description: Action to run on button 2 long press
      default: []
      selector:
        action: {}
    button_three_single_press:
      name: Button 3 (single press)
      description: Action to run on button 3 single press
      default: []
      selector:
        action: {}
    button_three_double_press:
      name: Button 3 (double press)
      description: Action to run on button 3 double press
      default: []
      selector:
        action: {}
    button_three_long_press:
      name: Button 3 (long press)
      description: Action to run on button 3 long press
      default: []
      selector:
        action: {}
    button_four_single_press:
      name: Button 4 (single press)
      description: Action to run on button 4 single press
      default: []
      selector:
        action: {}
    button_four_double_press:
      name: Button 4 (double press)
      description: Action to run on button 4 double press
      default: []
      selector:
        action: {}
    button_four_long_press:
      name: Button 4 (long press)
      description: Action to run on button 4 long press
      default: []
      selector:
        action: {}
mode: restart
max_exceeded: silent
trigger:
- platform: event
  event_type: zha_event
  event_data:
    device_id: !input 'tuya_ts0044'
action:
  - variables:
      command: '{{ trigger.event.data.command }}'
      endpoint_id: '{{ trigger.event.data.endpoint_id }}'
  - choose:
    - conditions:
        - '{{ command == ''remote_button_short_press'' and endpoint_id == 1 }}'
      sequence: !input 'button_one_single_press'
    - conditions:
        - '{{ command == ''remote_button_double_press'' and endpoint_id == 1 }}'
      sequence: !input 'button_one_double_press'
    - conditions:
        - '{{ command == ''remote_button_long_press'' and endpoint_id == 1 }}'
      sequence: !input 'button_one_long_press'
    - conditions:
        - '{{ command == ''remote_button_short_press'' and endpoint_id == 2 }}'
      sequence: !input 'button_two_single_press'
    - conditions:
        - '{{ command == ''remote_button_double_press'' and endpoint_id == 2 }}'
      sequence: !input 'button_two_double_press'
    - conditions:
        - '{{ command == ''remote_button_long_press'' and endpoint_id == 2 }}'
      sequence: !input 'button_two_long_press'
    - conditions:
        - '{{ command == ''remote_button_short_press'' and endpoint_id == 3 }}'
      sequence: !input 'button_three_single_press'
    - conditions:
        - '{{ command == ''remote_button_double_press'' and endpoint_id == 3 }}'
      sequence: !input 'button_three_double_press'
    - conditions:
        - '{{ command == ''remote_button_long_press'' and endpoint_id == 3 }}'
      sequence: !input 'button_three_long_press'

        - '{{ command == ''remote_button_short_press'' and endpoint_id == 4 }}'
      sequence: !input 'button_four_single_press'
        - conditions:
        - '{{ command == ''remote_button_double_press'' and endpoint_id == 4 }}'
      sequence: !input 'button_four_double_press'
    - conditions:
        - '{{ command == ''remote_button_long_press'' and endpoint_id == 4 }}'
      sequence: !input 'button_four_long_press'

Nice one! I have the TS0044.
A line is empty near the end of the code, button 3 long press…

  • conditions:

Hi,

I also want to test this blueprint, but I can’t choose my TS0043 in the config dialog.

No matching devices found

#### Zigbee info
TS0043
von _TZ3000_qzjcsmar 
 Eigenart: zhaquirks.tuya.ts0043.TuyaSmartRemote0043TO

I have tried to modify the blueprint to use my switch:

          integration: zha
          manufacturer: _TZ3000_qzjcsmar
          model: TS0043

listen to zha events works:

{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "xxxx",
        "unique_id": "xxxxxxx",
        "device_id": "xxxxxxxaa",
        "endpoint_id": 3,
        "cluster_id": 6,
        "command": "remote_button_long_press",
        "args": []
    },
    "origin": "LOCAL",
    "time_fired": "2022-02-25T20:04:22.312274+00:00",
    "context": {
        "id": "27c5649601fa77d652f0b201a591cc9b",
        "parent_id": null,
        "user_id": null
    }
}

Can someone please explain me, what I need to set in the blueprint?

Thanks Micha

The same on my side, I have _TZ3000_kkahwiyu, also replaced in automation definition (but no events in my case). BTW, reload automations to make it available in device selection dropdown list. Have you found the solution yet?

Did you ever get _TZ3000_kkahwiyu working?

Thanks for the blueprint. I just got a TS0043 yesterday, but I can’t seem to get it working. It will connect to Home Assistant in ZHA after a long config process, but then I can’t do anything with it. The blueprint won’t recognize it as a compatible device. Any suggestions on how to get the device working right?

Hi
I have the same problème, my TS4003 is labeled as TS4003 by_TZ3000_famkxci2 TS0043 and they dont work with blueprint and dont work in HA.
The association with HA are ok but non event in zha_event listener
Do you have any suggestion for investigate?
Thanks

Same issue here. Device appears to be the same as the Tuya 3 button above _TZ3000_bi6lpsew but has a different manufacturer listed TZ3000_famkxci2. Can someone with more knowledge please help?

Thanks!

If you send me the Zigbee device signature of your device, then I can make a new blueprint with the integration you need.

Thanks!

{
  "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, manufacturer_code=4417, maximum_buffer_size=66, maximum_incoming_transfer_size=66, server_mask=10752, maximum_outgoing_transfer_size=66, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *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)",
  "endpoints": {
    "1": {
      "profile_id": 260,
      "device_type": "0x0000",
      "in_clusters": [
        "0x0000",
        "0x0001",
        "0x0006"
      ],
      "out_clusters": [
        "0x000a",
        "0x0019"
      ]
    },
    "2": {
      "profile_id": 260,
      "device_type": "0x0000",
      "in_clusters": [
        "0x0001",
        "0x0006",
        "0xe000"
      ],
      "out_clusters": []
    },
    "3": {
      "profile_id": 260,
      "device_type": "0x0000",
      "in_clusters": [
        "0x0001",
        "0x0006",
        "0xe000"
      ],
      "out_clusters": []
    }
  },
  "manufacturer": "_TZ3000_famkxci2",
  "model": "TS0043",
  "class": "zigpy.device.Device"
}

@mobstaj
You can try the next blueprint for your remote. This is an additional configuration on the one in this topic.

"""Tuya 3 Button Remote."""

from zigpy.profiles import zha
from zigpy.quirks import CustomDevice
from zigpy.zcl.clusters.general import Basic, OnOff, Ota, PowerConfiguration, Time

from zhaquirks.const import (
    BUTTON_1,
    BUTTON_2,
    BUTTON_3,
    COMMAND,
    DEVICE_TYPE,
    DOUBLE_PRESS,
    ENDPOINT_ID,
    ENDPOINTS,
    INPUT_CLUSTERS,
    LONG_PRESS,
    MODEL,
    OUTPUT_CLUSTERS,
    PROFILE_ID,
    SHORT_PRESS,
)
from zhaquirks.tuya import (
    TuyaZBE000Cluster,
    TuyaSmartRemoteOnOffCluster,
)


class TuyaSmartRemote0043TI(CustomDevice):
    """Tuya 3-button remote device with in time cluster ."""

    signature = {
        # SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=0, device_version=1, input_clusters=[0, 10, 1, 6], output_clusters=[25]))
        # SizePrefixedSimpleDescriptor(endpoint=2, profile=260, device_type=0, device_version=1, input_clusters=[1, 6], output_clusters=[])
        # SizePrefixedSimpleDescriptor(endpoint=3, profile=260, device_type=0, device_version=1, input_clusters=[1, 6], output_clusters=[])
        MODEL: "TS0043",
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_SWITCH,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    PowerConfiguration.cluster_id,
                    OnOff.cluster_id,
                    Time.cluster_id,
                ],
                OUTPUT_CLUSTERS: [Ota.cluster_id],
            },
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_SWITCH,
                INPUT_CLUSTERS: [
                    PowerConfiguration.cluster_id,
                    OnOff.cluster_id,
                ],
                OUTPUT_CLUSTERS: [],
            },
            3: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_SWITCH,
                INPUT_CLUSTERS: [
                    PowerConfiguration.cluster_id,
                    OnOff.cluster_id,
                ],
                OUTPUT_CLUSTERS: [],
            },
        },
    }
    replacement = {
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.REMOTE_CONTROL,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    PowerConfiguration.cluster_id,
                    TuyaSmartRemoteOnOffCluster,
                    Time.cluster_id,
                ],
                OUTPUT_CLUSTERS: [Ota.cluster_id],
            },
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.REMOTE_CONTROL,
                INPUT_CLUSTERS: [
                    PowerConfiguration.cluster_id,
                    TuyaSmartRemoteOnOffCluster,
                ],
                OUTPUT_CLUSTERS: [],
            },
            3: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.REMOTE_CONTROL,
                INPUT_CLUSTERS: [
                    PowerConfiguration.cluster_id,
                    TuyaSmartRemoteOnOffCluster,
                ],
                OUTPUT_CLUSTERS: [],
            },
        },
    }

    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},
        (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},
    }


class TuyaSmartRemote0043TO(CustomDevice):
    """Benexmart/Tuya 3-button remote device with out time cluster."""

    signature = {
        # SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=0, device_version=1, input_clusters=[0, 1, 6], output_clusters=[10, 25]))
        # SizePrefixedSimpleDescriptor(endpoint=2, profile=260, device_type=0, device_version=1, input_clusters=[1, 6], output_clusters=[])
        # SizePrefixedSimpleDescriptor(endpoint=3, profile=260, device_type=0, device_version=1, input_clusters=[1, 6], output_clusters=[])
        MODEL: "TS0043",
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_SWITCH,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    PowerConfiguration.cluster_id,
                    OnOff.cluster_id,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_SWITCH,
                INPUT_CLUSTERS: [
                    PowerConfiguration.cluster_id,
                    OnOff.cluster_id,
                ],
                OUTPUT_CLUSTERS: [],
            },
            3: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_SWITCH,
                INPUT_CLUSTERS: [
                    PowerConfiguration.cluster_id,
                    OnOff.cluster_id,
                ],
                OUTPUT_CLUSTERS: [],
            },
        },
    }
    replacement = {
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.REMOTE_CONTROL,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    PowerConfiguration.cluster_id,
                    TuyaSmartRemoteOnOffCluster,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.REMOTE_CONTROL,
                INPUT_CLUSTERS: [
                    PowerConfiguration.cluster_id,
                    TuyaSmartRemoteOnOffCluster,
                ],
                OUTPUT_CLUSTERS: [],
            },
            3: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.REMOTE_CONTROL,
                INPUT_CLUSTERS: [
                    PowerConfiguration.cluster_id,
                    TuyaSmartRemoteOnOffCluster,
                ],
                OUTPUT_CLUSTERS: [],
            },
        },
    }

    device_automation_triggers = {
        (SHORT_PRESS, BUTTON_1): {ENDPOINT_ID: 1, COMMAND: SHORT_PRESS},
        (DOUBLE_PRESS, BUTTON_1): {ENDPOINT_ID: 1, COMMAND: DOUBLE_PRESS},
        (SHORT_PRESS, BUTTON_2): {ENDPOINT_ID: 2, COMMAND: SHORT_PRESS},
        (DOUBLE_PRESS, BUTTON_2): {ENDPOINT_ID: 2, COMMAND: DOUBLE_PRESS},
        (SHORT_PRESS, BUTTON_3): {ENDPOINT_ID: 3, COMMAND: SHORT_PRESS},
        (DOUBLE_PRESS, BUTTON_3): {ENDPOINT_ID: 3, COMMAND: DOUBLE_PRESS},
    }


class TuyaSmartRemote0043LO(CustomDevice):
    """Loratap/Tuya 3-button remote control ("manufacturer": "_TZ3000_famkxci2")."""

    signature = {
        # SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=6, device_version=1, input_clusters=[0, 1, 6], output_clusters=[10, 25]))
        # SizePrefixedSimpleDescriptor(endpoint=2, profile=260, device_type=6, device_version=1, input_clusters=[1, 6, 57344], output_clusters=[])
        # SizePrefixedSimpleDescriptor(endpoint=3, profile=260, device_type=6, device_version=1, input_clusters=[1, 6, 57344], output_clusters=[])
        MODEL: "TS0043",
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_SWITCH,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    PowerConfiguration.cluster_id,
                    OnOff.cluster_id,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_SWITCH,
                INPUT_CLUSTERS: [
                    PowerConfiguration.cluster_id,
                    OnOff.cluster_id,
                    TuyaZBE000Cluster.cluster_id
                ],
                OUTPUT_CLUSTERS: [],
            },
            3: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_SWITCH,
                INPUT_CLUSTERS: [
                    PowerConfiguration.cluster_id,
                    OnOff.cluster_id,
                    TuyaZBE000Cluster.cluster_id
                ],
                OUTPUT_CLUSTERS: [],
            },
        },
    }
    replacement = {
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.REMOTE_CONTROL,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    PowerConfiguration.cluster_id,
                    TuyaSmartRemoteOnOffCluster,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.REMOTE_CONTROL,
                INPUT_CLUSTERS: [
                    PowerConfiguration.cluster_id,
                    TuyaSmartRemoteOnOffCluster,
                    TuyaZBE000Cluster.cluster_id
                ],
                OUTPUT_CLUSTERS: [],
            },
            3: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.REMOTE_CONTROL,
                INPUT_CLUSTERS: [
                    PowerConfiguration.cluster_id,
                    TuyaSmartRemoteOnOffCluster,
                    TuyaZBE000Cluster.cluster_id
                ],
                OUTPUT_CLUSTERS: [],
            },
        },
    }

    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},
        (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},
    }

I still can’t tie this blueprint to the remote. Says that no matching devices are found. Thanks for your help, sorry that I’m not much help.

@mobstaj
This should do the trick.
Make sure the quirk is in the right folder /config/zha_quirks/ts0043.py (in my case)
And you set your quirks path under the zha config in /config/configuration.yaml:
zha:
enable_quirks: true
custom_quirks_path: /config/zha_quirks

After this restart Home Assistant and the device shoud be discovered correctly and useable.
If not try deleting the remote and search for it again.

I have the same problem, can you help me? But i would need a little bit more step by step on how to get this to work, i have no programming skills…

Here is signiture of my device:

{
  "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, manufacturer_code=4417, maximum_buffer_size=66, maximum_incoming_transfer_size=66, server_mask=10752, maximum_outgoing_transfer_size=66, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *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)",
  "endpoints": {
    "1": {
      "profile_id": 260,
      "device_type": "0x0000",
      "in_clusters": [
        "0x0000",
        "0x0001",
        "0x0006",
        "0xe000"
      ],
      "out_clusters": [
        "0x000a",
        "0x0019"
      ]
    },
    "2": {
      "profile_id": 260,
      "device_type": "0x0000",
      "in_clusters": [
        "0x0001",
        "0x0006"
      ],
      "out_clusters": []
    },
    "3": {
      "profile_id": 260,
      "device_type": "0x0000",
      "in_clusters": [
        "0x0001",
        "0x0006"
      ],
      "out_clusters": []
    },
    "4": {
      "profile_id": 260,
      "device_type": "0x0000",
      "in_clusters": [
        "0x0001",
        "0x0006"
      ],
      "out_clusters": []
    }
  },
  "manufacturer": "_TZ3000_uyjmm0et",
  "model": "TS0043",
  "class": "zigpy.device.Device"
}

It is recognized as 4 gang switch, but can’t use it. I’ve seen some logs in pairing window and it did respond with errors when buttons pressed. Here are HA logs regarding ZHA:

Logger: zigpy.zcl
Source: runner.py:119
First occurred: October 13, 2022, 6:12:14 PM (100 occurrences)
Last logged: October 13, 2022, 7:19:45 PM

  • [0x8876:2:0x0006] Unknown cluster command 253 b’\x01’
  • [0x8876:3:0x0006] Unknown cluster command 253 b’\x00’
  • [0x8876:3:0x0006] Unknown cluster command 253 b’\x02’
  • [0x8876:3:0x0006] Unknown cluster command 253 b’\x01’
  • [0x8876:2:0x0006] Unknown cluster command 253 b’\x00’

Here is the code that should work with your remote.
It is strange that it is called TS0043 and not TS0044, but this should do it.
In my previous post I described were the file needs to go.
If you need more explanation, please let me know.

"""Tuya 3 Button Remote."""

from zigpy.profiles import zha
from zigpy.quirks import CustomDevice
from zigpy.zcl.clusters.general import Basic, OnOff, Ota, PowerConfiguration, Time

from zhaquirks.const import (
    BUTTON_1,
    BUTTON_2,
    BUTTON_3,
    BUTTON_4,
    COMMAND,
    DEVICE_TYPE,
    DOUBLE_PRESS,
    ENDPOINT_ID,
    ENDPOINTS,
    INPUT_CLUSTERS,
    LONG_PRESS,
    MODEL,
    OUTPUT_CLUSTERS,
    PROFILE_ID,
    SHORT_PRESS,
)
from zhaquirks.tuya import (
    TuyaZBE000Cluster,
    TuyaSmartRemoteOnOffCluster,
)


class TuyaSmartRemote0043TI(CustomDevice):
    """Tuya 3-button remote device with in time cluster ."""

    signature = {
        # SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=0, device_version=1, input_clusters=[0, 10, 1, 6], output_clusters=[25]))
        # SizePrefixedSimpleDescriptor(endpoint=2, profile=260, device_type=0, device_version=1, input_clusters=[1, 6], output_clusters=[])
        # SizePrefixedSimpleDescriptor(endpoint=3, profile=260, device_type=0, device_version=1, input_clusters=[1, 6], output_clusters=[])
        MODEL: "TS0043",
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_SWITCH,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    PowerConfiguration.cluster_id,
                    OnOff.cluster_id,
                    Time.cluster_id,
                ],
                OUTPUT_CLUSTERS: [Ota.cluster_id],
            },
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_SWITCH,
                INPUT_CLUSTERS: [
                    PowerConfiguration.cluster_id,
                    OnOff.cluster_id,
                ],
                OUTPUT_CLUSTERS: [],
            },
            3: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_SWITCH,
                INPUT_CLUSTERS: [
                    PowerConfiguration.cluster_id,
                    OnOff.cluster_id,
                ],
                OUTPUT_CLUSTERS: [],
            },
        },
    }
    replacement = {
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.REMOTE_CONTROL,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    PowerConfiguration.cluster_id,
                    TuyaSmartRemoteOnOffCluster,
                    Time.cluster_id,
                ],
                OUTPUT_CLUSTERS: [Ota.cluster_id],
            },
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.REMOTE_CONTROL,
                INPUT_CLUSTERS: [
                    PowerConfiguration.cluster_id,
                    TuyaSmartRemoteOnOffCluster,
                ],
                OUTPUT_CLUSTERS: [],
            },
            3: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.REMOTE_CONTROL,
                INPUT_CLUSTERS: [
                    PowerConfiguration.cluster_id,
                    TuyaSmartRemoteOnOffCluster,
                ],
                OUTPUT_CLUSTERS: [],
            },
        },
    }

    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},
        (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},
    }


class TuyaSmartRemote0043TO(CustomDevice):
    """Benexmart/Tuya 3-button remote device with out time cluster."""

    signature = {
        # SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=0, device_version=1, input_clusters=[0, 1, 6], output_clusters=[10, 25]))
        # SizePrefixedSimpleDescriptor(endpoint=2, profile=260, device_type=0, device_version=1, input_clusters=[1, 6], output_clusters=[])
        # SizePrefixedSimpleDescriptor(endpoint=3, profile=260, device_type=0, device_version=1, input_clusters=[1, 6], output_clusters=[])
        MODEL: "TS0043",
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_SWITCH,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    PowerConfiguration.cluster_id,
                    OnOff.cluster_id,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_SWITCH,
                INPUT_CLUSTERS: [
                    PowerConfiguration.cluster_id,
                    OnOff.cluster_id,
                ],
                OUTPUT_CLUSTERS: [],
            },
            3: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_SWITCH,
                INPUT_CLUSTERS: [
                    PowerConfiguration.cluster_id,
                    OnOff.cluster_id,
                ],
                OUTPUT_CLUSTERS: [],
            },
        },
    }
    replacement = {
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.REMOTE_CONTROL,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    PowerConfiguration.cluster_id,
                    TuyaSmartRemoteOnOffCluster,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.REMOTE_CONTROL,
                INPUT_CLUSTERS: [
                    PowerConfiguration.cluster_id,
                    TuyaSmartRemoteOnOffCluster,
                ],
                OUTPUT_CLUSTERS: [],
            },
            3: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.REMOTE_CONTROL,
                INPUT_CLUSTERS: [
                    PowerConfiguration.cluster_id,
                    TuyaSmartRemoteOnOffCluster,
                ],
                OUTPUT_CLUSTERS: [],
            },
        },
    }

    device_automation_triggers = {
        (SHORT_PRESS, BUTTON_1): {ENDPOINT_ID: 1, COMMAND: SHORT_PRESS},
        (DOUBLE_PRESS, BUTTON_1): {ENDPOINT_ID: 1, COMMAND: DOUBLE_PRESS},
        (SHORT_PRESS, BUTTON_2): {ENDPOINT_ID: 2, COMMAND: SHORT_PRESS},
        (DOUBLE_PRESS, BUTTON_2): {ENDPOINT_ID: 2, COMMAND: DOUBLE_PRESS},
        (SHORT_PRESS, BUTTON_3): {ENDPOINT_ID: 3, COMMAND: SHORT_PRESS},
        (DOUBLE_PRESS, BUTTON_3): {ENDPOINT_ID: 3, COMMAND: DOUBLE_PRESS},
    }


class TuyaSmartRemote0043LO(CustomDevice):
    """Loratap/Tuya 3-button remote control ("manufacturer": "_TZ3000_famkxci2")."""

    signature = {
        # SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=6, device_version=1, input_clusters=[0, 1, 6], output_clusters=[10, 25]))
        # SizePrefixedSimpleDescriptor(endpoint=2, profile=260, device_type=6, device_version=1, input_clusters=[1, 6, 57344], output_clusters=[])
        # SizePrefixedSimpleDescriptor(endpoint=3, profile=260, device_type=6, device_version=1, input_clusters=[1, 6, 57344], output_clusters=[])
        MODEL: "TS0043",
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_SWITCH,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    PowerConfiguration.cluster_id,
                    OnOff.cluster_id,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_SWITCH,
                INPUT_CLUSTERS: [
                    PowerConfiguration.cluster_id,
                    OnOff.cluster_id,
                    TuyaZBE000Cluster.cluster_id,
                ],
                OUTPUT_CLUSTERS: [],
            },
            3: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_SWITCH,
                INPUT_CLUSTERS: [
                    PowerConfiguration.cluster_id,
                    OnOff.cluster_id,
                    TuyaZBE000Cluster.cluster_id,
                ],
                OUTPUT_CLUSTERS: [],
            },
        },
    }
    replacement = {
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.REMOTE_CONTROL,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    PowerConfiguration.cluster_id,
                    TuyaSmartRemoteOnOffCluster,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.REMOTE_CONTROL,
                INPUT_CLUSTERS: [
                    PowerConfiguration.cluster_id,
                    TuyaSmartRemoteOnOffCluster,
                    TuyaZBE000Cluster.cluster_id,
                ],
                OUTPUT_CLUSTERS: [],
            },
            3: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.REMOTE_CONTROL,
                INPUT_CLUSTERS: [
                    PowerConfiguration.cluster_id,
                    TuyaSmartRemoteOnOffCluster,
                    TuyaZBE000Cluster.cluster_id,
                ],
                OUTPUT_CLUSTERS: [],
            },
        },
    }

    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},
        (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},
    }
	
class TuyaSmartRemote0043_4(CustomDevice):
    """Tuya 4-button remote control ("manufacturer": "_TZ3000_uyjmm0et")."""

    signature = {
        # SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=0, device_version=1, input_clusters=[0, 1, 6, 57344], output_clusters=[10, 25]))
        # SizePrefixedSimpleDescriptor(endpoint=2, profile=260, device_type=0, device_version=1, input_clusters=[1, 6], output_clusters=[])
        # SizePrefixedSimpleDescriptor(endpoint=3, profile=260, device_type=0, device_version=1, input_clusters=[1, 6], output_clusters=[])
		# SizePrefixedSimpleDescriptor(endpoint=4, profile=260, device_type=0, device_version=1, input_clusters=[1, 6], output_clusters=[])
        MODEL: "TS0043",
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_SWITCH,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    PowerConfiguration.cluster_id,
                    OnOff.cluster_id,
                    TuyaZBE000Cluster.cluster_id,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_SWITCH,
                INPUT_CLUSTERS: [
                    PowerConfiguration.cluster_id,
                    OnOff.cluster_id,
                ],
                OUTPUT_CLUSTERS: [],
            },
            3: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_SWITCH,
                INPUT_CLUSTERS: [
                    PowerConfiguration.cluster_id,
                    OnOff.cluster_id,
                ],
                OUTPUT_CLUSTERS: [],
            },
			4: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_SWITCH,
                INPUT_CLUSTERS: [
                    PowerConfiguration.cluster_id,
                    OnOff.cluster_id,
                ],
                OUTPUT_CLUSTERS: [],
            },
        },
    }
    replacement = {
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.REMOTE_CONTROL,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    PowerConfiguration.cluster_id,
                    TuyaSmartRemoteOnOffCluster,
                    TuyaZBE000Cluster.cluster_id
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.REMOTE_CONTROL,
                INPUT_CLUSTERS: [
                    PowerConfiguration.cluster_id,
                    TuyaSmartRemoteOnOffCluster,
                ],
                OUTPUT_CLUSTERS: [],
            },
            3: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.REMOTE_CONTROL,
                INPUT_CLUSTERS: [
                    PowerConfiguration.cluster_id,
                    TuyaSmartRemoteOnOffCluster,
                ],
                OUTPUT_CLUSTERS: [],
            },
			4: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.REMOTE_CONTROL,
                INPUT_CLUSTERS: [
                    PowerConfiguration.cluster_id,
                    TuyaSmartRemoteOnOffCluster,
                ],
                OUTPUT_CLUSTERS: [],
            },
        },
    }

    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},
        (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},
    }

Thank you for your help.

I have then used a quirk for TS0044 and changed Model to TS0043 and managed to get it working.

Mine had a different manufacturer code _TZ3000_mjwg6a52

blueprint:
  name: ZHA - Tuya TS0043 3 button remote
  description: Automate your Tuya TS0043 3 button remote using
    ZHA events.
  domain: automation
  input:
    tuya_ts0043:
      name: Tuya TS0043 3 button remote
      description: Tuya TS0043 3 button remote to use
      selector:
        device:
          integration: zha
          manufacturer: _TZ3000_mjwg6a52
          model: TS0043
    button_one_single_press:
      name: Button 1 (single press)
      description: Action to run on button 1 single press
      default: []
      selector:
        action: {}
    button_one_double_press:
      name: Button 1 (double press)
      description: Action to run on button 1 double press
      default: []
      selector:
        action: {}
    button_one_long_press:
      name: Button 1 (long press)
      description: Action to run on button 1 long press
      default: []
      selector:
        action: {}
    button_two_single_press:
      name: Button 2 (single press)
      description: Action to run on button 2 single press
      default: []
      selector:
        action: {}
    button_two_double_press:
      name: Button 2 (double press)
      description: Action to run on button 2 double press
      default: []
      selector:
        action: {}
    button_two_long_press:
      name: Button 2 (long press)
      description: Action to run on button 2 long press
      default: []
      selector:
        action: {}
    button_three_single_press:
      name: Button 3 (single press)
      description: Action to run on button 3 single press
      default: []
      selector:
        action: {}
    button_three_double_press:
      name: Button 3 (double press)
      description: Action to run on button 3 double press
      default: []
      selector:
        action: {}
    button_three_long_press:
      name: Button 3 (long press)
      description: Action to run on button 3 long press
      default: []
      selector:
        action: {}
mode: restart
max_exceeded: silent
trigger:
- platform: event
  event_type: zha_event
  event_data:
    device_id: !input 'tuya_ts0043'
action:
  - variables:
      command: '{{ trigger.event.data.command }}'
      endpoint_id: '{{ trigger.event.data.endpoint_id }}'
  - choose:
    - conditions:
        - '{{ command == ''remote_button_short_press'' and endpoint_id == 1 }}'
      sequence: !input 'button_one_single_press'
    - conditions:
        - '{{ command == ''remote_button_double_press'' and endpoint_id == 1 }}'
      sequence: !input 'button_one_double_press'
    - conditions:
        - '{{ command == ''remote_button_long_press'' and endpoint_id == 1 }}'
      sequence: !input 'button_one_long_press'
    - conditions:
        - '{{ command == ''remote_button_short_press'' and endpoint_id == 2 }}'
      sequence: !input 'button_two_single_press'
    - conditions:
        - '{{ command == ''remote_button_double_press'' and endpoint_id == 2 }}'
      sequence: !input 'button_two_double_press'
    - conditions:
        - '{{ command == ''remote_button_long_press'' and endpoint_id == 2 }}'
      sequence: !input 'button_two_long_press'
    - conditions:
        - '{{ command == ''remote_button_short_press'' and endpoint_id == 3 }}'
      sequence: !input 'button_three_single_press'
    - conditions:
        - '{{ command == ''remote_button_double_press'' and endpoint_id == 3 }}'
      sequence: !input 'button_three_double_press'
    - conditions:
        - '{{ command == ''remote_button_long_press'' and endpoint_id == 3 }}'
      sequence: !input 'button_three_long_press'