ZHA - Tuya 4-button Scene Switch (TS0044)

Anyone have pointers for debugging my installation of this? I’ve got one of these switches connected and ZHA says it’s connected and is reporting the battery level. Initially my switch wasn’t showing up, but when I updated the manufacturer to _TZ3000_xabckq1v and the model to TS004F I was able to make an automation and select my device. To start out I tried a call service to a switch that I often use and it doesn’t seem to work.

Are there any events I can monitor to see what’s going on? Other devices connected to ZHA seem to work. Was changing the manufacturer and model not a good idea?

Hey were you able to solve this problem? I have the same _TZ3000_xabckq1v manufacturer and TS004F model, I was trying to monitor its event but nothing showed up

No luck yet. I tried doing an events subscription for everything on ZHA and that turned out to be a bad idea. Apparently there’s a lot of communications going on there and it made a bunch of stuff get weird until I did a restart. I’ll keep trying and report back if I have any luck.

Unfortunately this is a different one. The TS004F only has 6 ‘buttons’. 4 single clicks, and 2 long (or double clicks, don’t know anymore), for the right buttons.

I had the same issue. I think it’s a firmware screwup in a batch of these switches. I bought one 2 months ago, it registered as a TS0044 manufacturer _TZ3000_vp6clf9d. Have all 4 switches working flawlessly. So I bought 2 more last month. They looked the same but registered as a TS004F manufacturer _TZ3000_xabckq1v. They only configured as a single switch.
I complained to seller. They protested. I contacted Amazon. Got a refund for the 2 last ones with lots of whining from Seller in China.

After some more tries I couldnt get the TS004F to work, so I decided to get the Aqara Opple 6 buttons instead, works great, for the TS004F ima just put it away for now and try it later… if i have time lol

EDIT: Damn tried to streamline but made it worse ha ha. Updated with correct info!

After spending at least an hour or more running through the various threads regarding this 4-Gang switch, specifically the TS004F. I thought I would just put a concise rundown on how to get this working and the outcomes / limitations.

Firstly, the limitations:

This will not be configured as a 12 button switch. The only actions that are available once correctly configured are:

  • Turn On button pressed
  • Turn off button pressed
  • Dim up button pressed
  • Dim down button pressed
  • Dim up continuously pressed
  • Dim down continuously pressed
  • Dim down released after long press

Configuration

Before proceeding, delete any instances of this device in your ZHA integration and ensure that your gateway is on the latest firmware version.

  1. Create a folder on your HA instance config folder called custom_zha_quirks for instance

    \\homeassistant\config\custom_zha_quirks

  2. Create a file in this new folder called ts004f.py and copy the latest content of the file:

    TS004F custom quirk

  3. In your config\configuration.yaml add the following lines:

    zha:
    custom_quirks_path: /config/custom_zha_quirks/

  4. Restart your HA instance

  5. In the ZHA integration, add a new device, this will start the searching process

  6. On the device, hold the BOTTOM LEFT button for 10+ seconds, until all four lights begin flashing

  7. Wait for several seconds until ZHA discovers the device

Outcome

One point of confusion seems to be that no entities show up. This is expected. This device will add EVENTS not entities.

So you may not see any change from previous in the ZHA discovered device.

However, when you are creating automations etc, you will see the new events available:

As far as I know, at this point, this is the end result that we can expect.

2 Likes

I’m unable to get my switch working with this guide. I’ve followed the steps but nothing works when I press the buttons.

I’ve created the automation from the device page like in the screenshot of the guide post. Is there anything I could be doing wrong?

Same Here,
The device is shown in automations and can select triggers with and without the custom quirk.
Unfortunately nothing happens by pressing the buttons, nor I see any zha_event triggered
Signature:

  "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=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, 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": "0x0820",
      "in_clusters": [
        "0x0000",
        "0x0001",
        "0x0003",
        "0x1000"
      ],
      "out_clusters": [
        "0x0003",
        "0x0004",
        "0x0005",
        "0x0006",
        "0x0008",
        "0x000a",
        "0x0019",
        "0x1000"
      ]
    }
  },
  "manufacturer": "_TZ3000_xabckq1v",
  "model": "TS004F",
  "class": "ts004f.TuyaSmartRemote004F"
}```

Hi all

I’m new to the config side of this so I may have missed this.
And would need to figure out where to apply this config.

Is there a way to set an if statement on single press?
I.e. single press. If on then turn off, if off then turn on

You set the triggers in your Automation and you give an id for every one.
Then in your actions you have an Option Select with condition: trigger and the id you need to use.
Example:

alias: My Automation
description: 'Select Scenes'
trigger:
  - device_id: <The id from your Switch>
    domain: zha
    platform: device
    type: first_button_short_press
    subtype: first_button_short_press
    id: first_short
  - device_id: <The id from your Switch>
    domain: zha
    platform: device
    type: first_button_long_press
    subtype: first_button_long_press
    id: first_long
condition: []
action:
  - choose:
      - conditions:
          - condition: trigger
            id: first_short
        sequence:
          - action: {{<What you need to do if there is a short press on the first button > }}
      - conditions:
           - condition: trigger
            id: first_long
        sequence:
         - action: {{<What you need to do if there is a long press on the first button >}}
    default: []
mode: restart

Hi, I have another variant of this device (TS0044) as tuya scene remote

I’ve imported the blueprint, edited the manufacturer name to get the device detected in automation. But nothing seems to happen with any button press, or detected in zha_event
More or less similar to @ChreeceGR , may I know how you resolved your issue?


Signature:


{
  "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=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=<DescriptorCapability.0: 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": "0x0006",
      "in_clusters": [
        "0x0000",
        "0x0001",
        "0x0006"
      ],
      "out_clusters": [
        "0x000a",
        "0x0019"
      ]
    },
    "2": {
      "profile_id": 260,
      "device_type": "0x0006",
      "in_clusters": [
        "0x0001",
        "0x0006"
      ],
      "out_clusters": []
    },
    "3": {
      "profile_id": 260,
      "device_type": "0x0006",
      "in_clusters": [
        "0x0001",
        "0x0006"
      ],
      "out_clusters": []
    },
    "4": {
      "profile_id": 260,
      "device_type": "0x0006",
      "in_clusters": [
        "0x0001",
        "0x0006"
      ],
      "out_clusters": []
    }
  },
  "manufacturer": "_TZ3000_abci1hiu",
  "model": "TS0044",
  "class": "zhaquirks.tuya.ts0044.ZemiSmartRemote0044"
}

I didn’t yet resolve my issue…

I have the same issue here. The device is shown in automations and can select triggers, but nothing happens by pressing the buttons.

Anyone know how to solve this? I’m using the custom quirk posted by HoustonAU

It doesn’t work in zha.

I use it with tasmota (Z2T) on the sonoff bridge and mqtt-trigger.

Thasnks for the blueprint.
I just purchased an Ajax Online Zignito Scene Switch with model number ESW-0ZAA-EU. It works with this blueprint out the box.

Can’t import it anymore? can someone help?

Yes I’m having the same issue. I’m still getting to grips with HA. As I can’t import it like other ones how do I actually use this as a blueprint - how do I move it from this page to add it so I can us it in the UI?

Well I’ve actually worked out how to do this but putting into a .yaml file however when I select the drop down in the UI in the blueprint under the drop down part when it says “Tuya 4-button scene switch” under DEVICE it says “No matching devices found” so I can’t select the switch to use. I guess it’s something to do with the ID and how it’s named. Which is the bit in the yaml code I should chase to the name of my device as I’m getting confused. If anyone could help it would be greatly appreciated.

I needed to add a zigbee power plug as a router before it was able to see it was next to the conbee stick but it needed the power plug
Hold button until it start blinking