Zigbee2MQTT - Tuya 4-button Scene Switch (TS0044)

Thanks @francisp, but I’m already at the latest version (1.21).

I get all the actions listed for the TS004F but what I really wanted was the TS0044 with the 12 possible commands.

Unfortunately it seems impossible to procure. All the ones I get are TS004F and I don’t have a Tuya bridge.

I did the steps but I doesnt work
The log say

(node:1769) UnhandledPromiseRejectionWarning: TypeError: Cannot read property ‘length’ of undefined
at Object.addDefinition [as addDeviceDefinition] (/app/node_modules/zigbee-herdsman-converters/index.js:78:29)
at new ExternalConverters (/app/lib/extension/externalConverters.js:13:38)
at new Controller (/app/lib/controller.js:79:34)
at start (/app/index.js:94:18)

Somebody knows some solutions to resolve this problem

Hey @aiditz, I’ve been using your converter since months ago and worked perfectly! Thanks for that!

But since the last Z2M update (1.21.2-1) the converter is not working anymore. I get the default actions (on,off,brightness up & down).

Is there a way to fix this?

Since the last Z2M update this blueprint no longer works properly, namely:

  • if there is no change in the state it ignores the press of a button
  • if there is a change in the state (different button is pressed) it executes the previous command.

I have traced and researched so far, but my coding skills it this area are not sufficient to repair the blueprint.

Thanks in advance for any suggestion.

Have people got this working on zigbee2mqtt? as soon as i add the line for the convertor and restart z2mqtt, it fails to load.

You can use mqtt trigger in place of sensor. Everything remains the same.

1 Like
Logger: homeassistant.components.automation
Source: components/automation/__init__.py:646
Integration: Automation (documentation, issues)
First occurred: 4:49:40 PM (6 occurrences)
Last logged: 4:51:29 PM

Blueprint Zigbee2MQTT - Tuya 4-Button Scene Switch generated invalid automation with inputs OrderedDict([('switch', 'sensor.office_switch_action'), ('button_one_short_press', [OrderedDict([('service', 'climate.turn_on'), ('data', OrderedDict()), ('entity_id', 'climate.office_ac')])]), ('button_one_double_press', [OrderedDict([('service', ''), ('data', OrderedDict())])]), ('button_one_long_press', [OrderedDict([('service', 'climate.turn_off'), ('data', OrderedDict()), ('entity_id', 'climate.office_ac')])])]): Service does not match format <domain>.<name> for dictionary value @ data['action'][1]['choose'][4]['sequence'][0]['service']. Got None

I keep getting this error but I don’t see any corresponding automation. Any idea on how to fix this error?

For everyone that updated Zigbee2MQTT or the Blueprint stopped working in General,
Try changing this Part of the Code

action:
- choose:
  - conditions:
    - '{{ topic.split(''/'')[1].replace(''/'', '''') == deviceName.split('' '')[0]
      }}'
    sequence:
    - choose:
      - conditions:
        - '{{ command == ''1_single'' }}'
        sequence: !input 'button_one_short_press'
      - conditions:
        - '{{ command == ''3_single'' }}'
        sequence: !input 'button_two_short_press'
      - conditions:
        - '{{ command == ''2_single'' }}'
        sequence: !input 'button_three_short_press'
      - conditions:
        - '{{ command == ''4_single'' }}'
        sequence: !input 'button_four_short_press'
      - conditions:
        - '{{ command == ''2_hold'' }}'
        sequence: !input 'button_three_long_press'
      - conditions:
        - '{{ command == ''4_hold'' }}'
        sequence: !input 'button_four_long_press'

This should make it work again, only the Package Content of Mqtt was changed

Bought one recently here: Tuya Smart ZigBee Smart Switch 4 Gang Scenario 12 Scene Switch Push Button Controller Support deCONZ Tuya Hub|Building Automation| - AliExpress

With the latest update of zigbee2mqtt the blueprint also works with the TS004F Model n ° ESW-0ZAA-EU (branded above the battery with number ESW-0ZBA-EU)

Link:
https://www.zigbee2mqtt.io/devices/TS004F.html

GRAZIE!

1 Like

Guys I have the zemismart 4 scene button connected to my SmartThings hub and works ok but in HA I can only get the Button 1 to work 2/3/4 do now work but maybe I am not calling it correctly?
You can see the button names here:


And this works image

But if I call Home Cinema Scene Button 1 or 2/3/4 it does not.
Any ideas? All buttons do work ok on the ST side but not on HA (child buttons do not work or I do not know what their names are?)

This blueprint seems broken with the most recent versions of both Zigbee2MQTT and Homeassistant. With the original blueprint the 4-button switch never triggers the automation. With the change from konnectedvn, further on in this topic, the automation gets triggered, but there’s no response to any of the actions.
I have the TuYa TS0044.

Has anyone else this behaviour? Any easy way to fix it? I now wrote my own automation, which works fine, but is tedious. A proper blueprint would be much better.

yep. just upgraded and none of my switches work with this blueprint… the automation does not get triggered.

1 Like

mine does not work too…

Created my blueprint with original code from first message to figure out what happened.
Works for me if I remove (or comment) line

  attribute: action

here

trigger:
- platform: state
  entity_id: !input "switch"
  attribute: action
3 Likes

Can confirm this worked for me when setting up today thank you :slight_smile:

1 Like

Make sure the Home Assistant Legacy and general Legacy switches in Z2M are set constantly. This is what’s messing you up I believe.

I don’t have this switch so I can’t tell you how this blueprint was designed to use what set-up for these legacy switches, but this is likely causing the inconsistencies.

You-all need to look at these and see how they are set and you will likely find the actual problem without having to change the blueprint code.

3 Likes

Just added one of these switches to Home Assistant and couldn’t get anything to work from the blueprint.
In Zigbee2MQTT
Enabled - Home Assistant legacy entity attributes (was previously disabled)
Enabled - Home Assistant legacy triggers

The blueprint now works perfectly. No other changes needed.
Thanks for the tip.

3 Likes

Good afternoon all,

has anyone of you got batteries issues on this 4-button zigbee scene switch?
I have received them recently and I configured them with Deconz (only the single press effective so far, but ok for me), but after one day, all 4 green diodes started flashing rapidly and it was not sending any command.
The documentation being very poor, I can but assume that this rapid flashing could be related to a low battery signal, but I was not expecting it to be out so fast.
Maybe my batteries were old, but before re-starting, has anyone experience this 4-Diodes simultaneous rapid flashing?

Thanks in advance
Vincent

its a battery low signal. maybe you got a bad battery?

2 Likes