ZHA - Tuya 4-button Scene Switch (TS0044)

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

I have the 1 gang scene sw “TS0041” trying to edit the yaml but the blue print will not load in homeassistant
Works with input ‘tuya_4button_scene_switch’ what input is correct for the 1 gang model?

blueprint:
  name: ZHA - Tuya 1-Button Scene Switch
  description: Automate your Tuya 1-Button Scene Switch using ZHA events.
  domain: automation
  input:
    tuya_4button_scene_switch:
      name: Tuya 1-Button Scene Switch
      description: Tuya 4-Button Scene Switch to use
      selector:
        device:
          integration: zha
          manufacturer: _TZ3000_vp6clf9d
          model: TS0041
    button_one_short_press:
      name: Single Press
      description: Action to run on button 1 (lower-left) single press
      default: []
      selector:
        action: {}
    button_one_double_press:
      name: Double Press
      description: Action to run on button 1 (lower-left) double press
      default: []
      selector:
        action: {}
    button_one_long_press:
      name: Long Press
      description: Action to run on button 1 (lower-left) long press
      default: []
      selector:
         action: {} 
mode: restart
max_exceeded: silent
trigger:
- platform: event
  event_type: zha_event
  event_data:
    device_id: !input 'tuya_1button_scene_switch'
action:
- variables:
    command: '{{ trigger.event.data.command }}'   
    endpoint_id: '{{ trigger.event.data.endpoint_id }}'
- choose:
  - conditions: "{{ command == 'remote_button_short_press' }}"
    sequence:
    - choose:
      - conditions: '{{ endpoint_id == 1 }}'
        sequence: !input 'button_one_short_press'
  - conditions: "{{ command == 'remote_button_double_press' }}"
    sequence:
    - choose:
      - conditions: '{{ endpoint_id == 1 }}'
        sequence: !input 'button_one_double_press'
  - conditions: "{{ command == 'remote_button_long_press' }}"
    sequence:
    - choose:
      - conditions: '{{ endpoint_id == 1 }}'
        sequence: !input 'button_one_long_press'

It works great! I changed:

      manufacturer: _TZ3000_b7bxojrg
      model: TS0044

image

Blueprint don’t work for the 1 gang sw fixed it with a event trigger attached images hope it helps



Hi everyone. I have exactly this model but my Zigbee coordinator (conbee II/ZHA) gives a different Tuya model (TS004F) when pairing, so the blueprint with the 12 buttons is not working.

Does anybodoy know why is this happening? The backside of the switch shows the correct Serial-nr for the device TS0044.

Thanks
mvk

Same for me tried this blueprint worked for me

That works indeed but its for a Tuya 4-button switch TS004F with just 6 commands.

According to the model number of the device, I have the switch TS0044 and it should activate up to 12 commands but my coordinator detect my TS0044 as TS004F. I can´t make it work with the TS0044 blueprint.

Someone with same issue? How can I check if my coordinator takes the false device? or if it is detecting the right device and I got fooled on aliexpress?

@Stringer How do you use the blueprint when there’s no device able to be selected after pairing the TS0044 with zha?

am I missing something or there’s just a special way to pair this scene controller?

1 Like

then you you dont have the same device

Delete the existing device. BEFORE you re-pair it, hold both the upper right and lower right keys at the same time until the lower left key’s light flashes (you may need to hold the keys down for about 15 seconds). THEN pair it. It will still register as a TS004F but this blueprint does indeed work for all 4 buttons, each with 4 functions.

Actually, all it takes is to modify the blueprint to match with the same device.

I’m getting a malformed error when attempting to create this automation. are you able to paste your YAML?

I tried this , i added the blueprint. and now i can choose the device. but the automations don’t work. i think its a bigger incompatibility issue with the model i have

      manufacturer: _TZ3000_x7mej5oc
      model: TS0041

Did you sort this out Rob, I know some time has passed but I had the same issue so this is what I did.

Downloaded the Blueprint and installed that into Home Assistant.

Installed the switch into my ZHA integration and checked that I could see all the events using the developer>events and subscribing to zha_event

Once installed I took the manufacturer number from the ZHA dashboard for the device.

I now use me File editor to navigate to config/blueprints/automations/stringer/zha-tuya-4-button-scene-switch-ts0044.yaml

Here you will see:

blueprint:
  name: ZHA - Tuya 4-Button Scene Switch
  description: Automate your Tuya 4-Button Scene Switch using ZHA events.
  domain: automation
  input:
    tuya_4button_scene_switch:
      name: Tuya 4-Button Scene Switch
      description: Tuya 4-Button Scene Switch to use
      selector:
        device:
          integration: zha
          manufacturer: _TZ3000_wkai4ga5
          model: TS0044
          multiple: false

I simply pasted the device manufacturer that I’d copied to replace the manufacturer and saved the file. Reload automations and the device showed up in the blueprint.

3 device now working fine

1 Like

Thanks, solved for my Moes wireless scene switch
manufacturer: _TZ3000_wkai4ga5
Is working now

Hi Eduardo,

I also tried to add my Moes 4-way switch but it didnt worked. I used the blueprint mentioned above, changed the integration to deconz and paired the device.

I see the device info:

Device info

TS0044
by _TZ3000_wkai4ga5

Connected via [Phoscon-GW]

Reloaded automation, deconz and complete HA but when I click on Add Automation it states there is no automation available for the device.

And of course I see the events fired in the Logbook.

Can you help out ?

1 Like

Thank very much for this blue print - worked like a charm (eventually);
Patience seems to be the key with these devices…
Home Assistant 2022.12.8
Supervisor 2022.12.1
Operating System 9.4
Frontend 20221213.1 - latest
Here are the steps I used;

  1. bind the device to HA (Hold the 3 button (bottom left) for nearly 15 seconds, until all lights flash.
    Here is what it looks like when bound to zb network;
    image
  • I found the pairing process to be VERY SLOW like 10 minutes to complete the interview, be patient.
  1. press button 2 and 4 and hold for around 3 seconds (until button 3 flashes once. For my device this was critical to get the automation in the blue print to work. If this doesnt work try rebinding to a different router. I finally got this to work using sonoff 31zb.
  2. Import the blueprint (luisfmrosa/zha-ts004f-tuya-4-button-dimmer-switch-blueprint.yaml)
  3. setup the automations you want in the blue print.
    Here are some donts I did :wink:

I did not have the install any ZHA quirks to successfully deploy.

  • Don’t change the device name - it seemed to cause it not to be detected by the blue print.
    If everything appears to be working but the automations don’t trigger in the blue print - you very VERY likely not successful in step 3 (hold button 2 and 4 until button 3 flashes). You will see the automation trace going around all your objects, instead of through as below;
    image

I hope this is helpful for other users :slight_smile: :upside_down_face:

Struggling here… I use ZHA for Zigbee stuff in my house, and have a Tuya ZB gateway in my cabin connected to a WAP (run from ethernet cable).
I’ve tested the TS0044 with ZHA in the house and it works fine, all button presses are recognized. Now, when I pair it with the Tuya gateway, it integrates with HA as a different name (ZC-YED 四键场景开关(无遥控功能)) and doesn’t allow me to create any automations, seemingly seeing no entities.

Separate Sonoff gateway finds the device but doesn’t actually pair with it. Anyone know if I can use the Tuya integration to show the device properly?
Alternatively, does anyone know how I can extend the ZHA network to my cabin?

I think you may have some options.
Option 1 install some zigbee repeaters to stregthen your zigbee network to the cabin (dont know how far it is…) - I used this method in my integration
Option 2 - Use the Tuya Cloud integration in HA to connect to the Tuya and control the device. I use this for other devices temporarily then add them using the local tuya integration.
Option 3 - Integrate them using Tuyalocal

sometimes it lags, I don’t know why, anyone has any suggestions? missclick or just have to wait 10 seconds for light to turn on