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. ![]()
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. ![]()
Thank you. You just saved me few days work.
Working like a charm.
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.
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).
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.
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
This blueprint stopped working after some breaking changes in Zigbee2MQTT 2.0.0 Zigbee2MQTT 2.0.0 breaking changes · Koenkk/zigbee2mqtt · Discussion #24198 · GitHub
Would be nice if there is a workaround.
Second vote for a fix for this blueprint post Z2MQTT 2.0.0 Change
try to add till the fix
legacy_action_sensor: true to your configuration.yaml file under homeassistant
the path is /homeassistant/zigbee2mqtt/configuration.yaml
homeassistant:
legacy_action_sensor: true
…
Not working for this Blueprint, the other Switches works now.
Yes, that did the trick. Don’t forget to restart the Zigbee2MQTT addon. Thank you.
Had the same, but needed to select the entity again in the automation and save it. My entity is called: “sensor.bar_switch_4_button_action”.
It’s the entity “Action” above “Battery”
Correct because after the update this entity was deleted.
I have move some of my switches to MQTT like this and it works. No need for blueprint any more
Please explain! zigbee2mqtt/Vierfachschalter/action works but at all 4 switches, which is the command für single klick button 1?
zigbee2mqtt/Vierfachschalter/action/1_single dosn’t work.
I made a new blueprint, avoiding the legacy action entity and implementing the MQTT device trigger.
It takes the Device ID. In my case, I have the 4 button switch. So, adjust to 1,2, or 3 according to your device.
blueprint:
name: Zigbee2MQTT 2.0 - Tuya 4-Button Scene Switch
description: Automate your Tuya 4-Button Scene Switch via Zigbee2MQTT.
domain: automation
input:
switch:
name: Tuya 4-Button Scene Switch
description: Select the Tuya 4-Button Scene Switch to use
selector:
device:
integration: mqtt
# Button 1 Actions
button_one_short_press:
name: Single Press - Button 1 (Lower-Left)
description: Action to run on button 1 single press
default: []
selector:
action: {}
button_one_double_press:
name: Double Press - Button 1 (Lower-Left)
description: Action to run on button 1 double press
default: []
selector:
action: {}
button_one_long_press:
name: Long Press - Button 1 (Lower-Left)
description: Action to run on button 1 long press
default: []
selector:
action: {}
# Button 2 Actions
button_two_short_press:
name: Single Press - Button 2 (Lower-Right)
description: Action to run on button 2 single press
default: []
selector:
action: {}
button_two_double_press:
name: Double Press - Button 2 (Lower-Right)
description: Action to run on button 2 double press
default: []
selector:
action: {}
button_two_long_press:
name: Long Press - Button 2 (Lower-Right)
description: Action to run on button 2 long press
default: []
selector:
action: {}
# Button 3 Actions
button_three_short_press:
name: Single Press - Button 3 (Upper-Right)
description: Action to run on button 3 single press
default: []
selector:
action: {}
button_three_double_press:
name: Double Press - Button 3 (Upper-Right)
description: Action to run on button 3 double press
default: []
selector:
action: {}
button_three_long_press:
name: Long Press - Button 3 (Upper-Right)
description: Action to run on button 3 long press
default: []
selector:
action: {}
# Button 4 Actions
button_four_short_press:
name: Single Press - Button 4 (Upper-Left)
description: Action to run on button 4 single press
default: []
selector:
action: {}
button_four_double_press:
name: Double Press - Button 4 (Upper-Left)
description: Action to run on button 4 double press
default: []
selector:
action: {}
button_four_long_press:
name: Long Press - Button 4 (Upper-Left)
description: Action to run on button 4 long press
default: []
selector:
action: {}
trigger:
# Button 1 Triggers
- platform: device
device_id: !input switch
domain: mqtt
type: action
subtype: 1_single
- platform: device
device_id: !input switch
domain: mqtt
type: action
subtype: 1_double
- platform: device
device_id: !input switch
domain: mqtt
type: action
subtype: 1_hold
# Button 2 Triggers
- platform: device
device_id: !input switch
domain: mqtt
type: action
subtype: 2_single
- platform: device
device_id: !input switch
domain: mqtt
type: action
subtype: 2_double
- platform: device
device_id: !input switch
domain: mqtt
type: action
subtype: 2_hold
# Button 3 Triggers
- platform: device
device_id: !input switch
domain: mqtt
type: action
subtype: 3_single
- platform: device
device_id: !input switch
domain: mqtt
type: action
subtype: 3_double
- platform: device
device_id: !input switch
domain: mqtt
type: action
subtype: 3_hold
# Button 4 Triggers
- platform: device
device_id: !input switch
domain: mqtt
type: action
subtype: 4_single
- platform: device
device_id: !input switch
domain: mqtt
type: action
subtype: 4_double
- platform: device
device_id: !input switch
domain: mqtt
type: action
subtype: 4_hold
action:
- variables:
command: '{{ trigger.payload }}'
- choose:
- conditions:
- '{{ command == ''1_single'' }}'
sequence: !input button_one_short_press
- conditions:
- '{{ command == ''2_single'' }}'
sequence: !input button_two_short_press
- conditions:
- '{{ command == ''3_single'' }}'
sequence: !input button_three_short_press
- conditions:
- '{{ command == ''4_single'' }}'
sequence: !input button_four_short_press
- conditions:
- '{{ command == ''1_double'' }}'
sequence: !input button_one_double_press
- conditions:
- '{{ command == ''2_double'' }}'
sequence: !input button_two_double_press
- conditions:
- '{{ command == ''3_double'' }}'
sequence: !input button_three_double_press
- conditions:
- '{{ command == ''4_double'' }}'
sequence: !input button_four_double_press
- conditions:
- '{{ command == ''1_hold'' }}'
sequence: !input button_one_long_press
- conditions:
- '{{ command == ''2_hold'' }}'
sequence: !input button_two_long_press
- conditions:
- '{{ command == ''3_hold'' }}'
sequence: !input button_three_long_press
- conditions:
- '{{ command == ''4_hold'' }}'
sequence: !input button_four_long_press
mode: single
max_exceeded: silent
Thank you fixed it for me too
Thanks for re-working this blueprint for Z2M 2.0! I’m grateful for the time you put into it ![]()
I made an adjustment in the button notation. Button 1 should be Upper-Left, at least on my Moe’s 4 button switch.
Thank you again!
Hi all, I’m pretty new to HA but most of the basics set up. Trying to get my Moes 4 button device working for weeks now with no avail. I’ve tried multiple blueprints and reinstalling the device and can’t seem to work it out. I’m probably missing something simple that many here would know. Model no: ESW-0ZAA-EU.
I’m also wondering if it’s my Sonoff Zigbee Dongle not having installed the device correctly as it’s been giving me trouble and breaking suddenly.
I’ve imported the blueprint above and picked up my device added the devices and actions but not working. The log shows that the 1st and 3rd buttons respond for on and off and the other 2 get the description shown. Apologies if this is quite basic, it’s just been getting on my nerves for weeks and I’m really wanting to improve my home assistant and learn over time to make it my central hub.