Zigbee2MQTT - Tuya 4-button Scene Switch (TS0044)

Thank you, this one worked for me.

Moes ZigBee Wireless 12
model: TS0044
manufacturer: _TZ3000_wkai4ga5

Allthough there is a typo on line 71. lower-right should be upper-right. :stuck_out_tongue_winking_eye:

1 Like

Thank you. You just saved me few days work.
Working like a charm.

1 Like

Do you know if it is possible to have the light of the button stays on if an automation is for instance activated via that button and then the led button light is off if the automation si turned off? Or there is no way to control the LED of each single button?

Hello !
The Blue Print assume the button was add by Zigbee Mqtt, but my button was implemented like normal sensor in Configuration Yaml

  sensor:
  - name: Office_ZB_Switch_Wall
    unique_id: SwitchZB01  
    state_topic: "tele/tasmota_C044DC/SENSOR"
    value_template: "{{ value_json['ZbReceived']['0x7E35'] }}"
    availability_topic: "tele/tasmota_C044DC/LWT"
    payload_available: "Online"
    payload_not_available: "Offline"
    qos: 0

and it return nice value as ststus::

    to_state:
      entity_id: sensor.office_zb_switch_wall
      state: >-
        {'Device': '0x7E35', '0006!FD': '00', 'LidlPower': 0, 'Endpoint': 4,
        'LinkQuality': 76}
      attributes:
        friendly_name: Office_ZB_Switch_Wall
      last_changed: "2024-10-04T12:24:06.234365+00:00"
      last_reported: "2024-10-04T12:24:06.234365+00:00"
      last_updated: "2024-10-04T12:24:06.234365+00:00"

This value

    command01: "{{ trigger.to_state.state }}"

geting the value : {‘Device’: ‘0x7E35’, ‘0006!FD’: ‘00’, ‘LidlPower’: 0, ‘Endpoint’: 4,
‘LinkQuality’: 76}

and all ok, but how to cut it in to 2 variablbes like:

command = "{{ trigger.to_state.state }}" get "LidlPower" value form json
swnumber = "{{ trigger.to_state.state }}" get "endpoint" value form json 

then modification of the rest will be easy
Szymon

Can confirm that removing the attribute: action line from the blueprint fixes the error
Error: UndefinedError: ‘dict object’ has no attribute ‘to_state’

I made two of my own blueprints for this device.

The two blueprints are for the same device, but with different functionality. The first blueprint provides a single layer of 4 buttons, each with a short press, double press, and long press event. The second blueprint provides 4 layers of 4 buttons, each with a short press and double press event, where the layer is selected by long pressing the respective button.

Single layer 4-button switch

This blueprint provides support as a standard single-layered 4-button switch. Each button has a short press, double press, and long press event. This provides up to 12 events per switch (short press, double press, long press for each of the 4 buttons).

Open your Home Assistant instance and show the blueprint import dialog with this blueprint pre-filled.

Quad layer 4-button switch

This blueprint provides support as a 4-layered 4-button switch. Each button has a short press and a double press event. The switch has 4 layers, and the layer is selected by long pressing the respective button. Top-left is button 1, therefore layer 1; and so on. This provides up to 8 events per layer (short press and double press for each button) on 4 layers, resulting in 32 total events.

Open your Home Assistant instance and show the blueprint import dialog with this blueprint pre-filled.

Hello,
Thanks for the blueprint.
When I an trying to use it under

Input Device
Select the Moes/Tuya 4-Button Scene Switch device

No devices re displayed, is there something I have to do before ?

Many thanx !!!

It works perfectly with my MOES remote control (runing on battery)

Thanks for sharing !

Cheers

1 Like