Moes 4-Button Scene Switch Z2M (TS0044) Blueprint
Easily Automate TS0044 Devices Paired via Zigbee2MQTT (Z2M)
Description
This blueprint is designed for the Moes 4-Button Scene Switch (TS0044), integrated with Zigbee2MQTT. It condenses all 12 unique button actions for a Scene Switch into a single, easy-to-maintain automation. It supports the following actions for each button:
- Single Press – single_press
- Double Press – double_press
- Hold – hold_press
This blueprint allows you to quickly and easily configure multiple actions for each button on the scene switch, making it a versatile tool for managing your smart home devices.
Prerequisites
Ensure your device is properly integrated with Zigbee2MQTT. You’ll need to locate the MQTT topic associated with your scene switch before setting up the blueprint.
Note:
-
To expose the actions in Z2M for use in Home Assistant automations, I needed to manually select each button/action on the Scene Switch (e.g., single-click, double-click, and hold every button on the device following initial pairing with Z2M). Without this step, Home Assistant didn’t seem to recognize the actions in the automation YAML.
-
If you run into this issue, try this out to see if the actions are exposed and registered in Home Assistant. If that doesn’t work, try trailing the Z2M logs and monitor action payloads to that MQTT topic. Every payload reference for each value_template in the YAML below should match the actions exposed by your device.
Steps to find your device’s MQTT topic:
- Navigate to the Zigbee2MQTT integration in Home Assistant.
- Select “Logs” from the ribbon header.
- Press any button on your Moes Scene Switch.
- Locate the latest log entry and note the MQTT topic displayed.
Device Information:
- Manufacturer: Moes / Tuya
- Device Type: 4-Button Scene Switch
- Model: TS0044
- Zigbee Manufacturer: _TZ3000_wkai4ga5
- Zigbee2MQTT Device Info: Link to TS0044
- Switch Button Action Correlations:
- Top-Left
- Top-Right
- Bottom-Left
- Bottom-Right
How to Use
- Import: Select the “Import Blueprint” button at the top of this post.
- Configure: Use the MQTT topic you found earlier in the “switch_topic” field. Assign actions to each button press (single, double, or hold) using the blueprint inputs.
- Test: Save and test your automation. If you run into any issues, feel free to leave a comment below.
Blueprint YAML
blueprint:
name: Moes/Tuya 4-Button Scene Switch (TS0044)
description: >
Controls various entities based on single and double press actions from a Moes 4-Button Scene Switch.
domain: automation
input:
switch_topic:
name: MQTT Topic
description: The MQTT topic for the scene switch.
selector:
text:
single_1:
name: Action for 1 Single Press
description: Action to run when button 1 is single pressed.
selector:
action: {}
single_2:
name: Action for 2 Single Press
description: Action to run when button 2 is single pressed.
selector:
action: {}
single_3:
name: Action for 3 Single Press
description: Action to run when button 3 is single pressed.
selector:
action: {}
single_4:
name: Action for 4 Single Press
description: Action to run when button 4 is single pressed.
selector:
action: {}
double_1:
name: Action for 1 Double Press
description: Action to run when button 1 is double pressed.
selector:
action: {}
double_2:
name: Action for 2 Double Press
description: Action to run when button 2 is double pressed.
selector:
action: {}
double_3:
name: Action for 3 Double Press
description: Action to run when button 3 is double pressed.
selector:
action: {}
double_4:
name: Action for 4 Double Press
description: Action to run when button 4 is double pressed.
selector:
action: {}
hold_1:
name: Action for 1 hold Press
description: Action to run when button 1 is held.
selector:
action: {}
hold_2:
name: Action for 2 hold Press
description: Action to run when button 2 is held.
selector:
action: {}
hold_3:
name: Action for 3 hold Press
description: Action to run when button 3 is held.
selector:
action: {}
hold_4:
name: Action for 4 hold Press
description: Action to run when button 4 is held.
selector:
action: {}
trigger:
- platform: mqtt
topic: !input switch_topic
action:
- choose:
- conditions:
- condition: template
value_template: "{{ trigger.payload == '1_single' }}"
sequence: !input single_1
- conditions:
- condition: template
value_template: "{{ trigger.payload == '2_single' }}"
sequence: !input single_2
- conditions:
- condition: template
value_template: "{{ trigger.payload == '3_single' }}"
sequence: !input single_3
- conditions:
- condition: template
value_template: "{{ trigger.payload == '4_single' }}"
sequence: !input single_4
- conditions:
- condition: template
value_template: "{{ trigger.payload == '1_double' }}"
sequence: !input double_1
- conditions:
- condition: template
value_template: "{{ trigger.payload == '2_double' }}"
sequence: !input double_2
- conditions:
- condition: template
value_template: "{{ trigger.payload == '3_double' }}"
sequence: !input double_3
- conditions:
- condition: template
value_template: "{{ trigger.payload == '4_double' }}"
sequence: !input double_4
- conditions:
- condition: template
value_template: "{{ trigger.payload == '1_hold' }}"
sequence: !input hold_1
- conditions:
- condition: template
value_template: "{{ trigger.payload == '2_hold' }}"
sequence: !input hold_2
- conditions:
- condition: template
value_template: "{{ trigger.payload == '3_hold' }}"
sequence: !input hold_3
- conditions:
- condition: template
value_template: "{{ trigger.payload == '4_hold' }}"
sequence: !input hold_4
mode: single