This is a blueprint for the Tuya TS0044 4-button scene switch.
It supports single push, double push and long push actions.
blueprint:
name: deCONZ - Tuya TS0044 4-button scene switch
description: Automate your Tuya TS0044 4 button scene switch using deCONZ events.
domain: automation
input:
tuya_ts0044:
name: Tuya TS0044 4 button scene switch
description: Tuya TS0044 4 button scene switch to use
selector:
device:
integration: deconz
manufacturer: _TZ3000_vp6clf9d
model: TS0044
button_one_long_press:
name: Button 1 (long press)
description: Action to run on button 1 (lower-left) long press
default: []
selector:
action: {}
button_one_single_press:
name: Button 1 (single press)
description: Action to run on button 1 (lower-left) single press
default: []
selector:
action: {}
button_one_double_press:
name: Button 1 (double press)
description: Action to run on button 1 (lower-left) double press
default: []
selector:
action: {}
button_two_long_press:
name: Button 2 (long press)
description: Action to run on button 2 (lower-right) long press
default: []
selector:
action: {}
button_two_single_press:
name: Button 2 (single press)
description: Action to run on button 2 (lower-right) single press
default: []
selector:
action: {}
button_two_double_press:
name: Button 2 (double press)
description: Action to run on button 2 (lower-right) double press
default: []
selector:
action: {}
button_three_long_press:
name: Button 3 (long press)
description: Action to run on button 3 (upper-right) long press
default: []
selector:
action: {}
button_three_single_press:
name: Button 3 (single press)
description: Action to run on button 3 (upper-right) single press
default: []
selector:
action: {}
button_three_double_press:
name: Button 3 (double press)
description: Action to run on button 3 (upper-right) double press
default: []
selector:
action: {}
button_four_long_press:
name: Button 4 (long press)
description: Action to run on button 4 (upper-left) long press
default: []
selector:
action: {}
button_four_single_press:
name: Button 4 (single press)
description: Action to run on button 4 (upper-left) single press
default: []
selector:
action: {}
button_four_double_press:
name: Button 4 (double press)
description: Action to run on button 4 (upper-left) double press
default: []
selector:
action: {}
mode: restart
max_exceeded: silent
trigger:
- platform: event
event_type: deconz_event
event_data:
device_id: !input 'tuya_ts0044'
action:
- variables:
event: '{{ trigger.event.data.event }}'
- choose:
- conditions:
- '{{ event == 1003 }}'
sequence: !input 'button_one_long_press'
- conditions:
- '{{ event == 1002 }}'
sequence: !input 'button_one_single_press'
- conditions:
- '{{ event == 1004 }}'
sequence: !input 'button_one_double_press'
- conditions:
- '{{ event == 2003 }}'
sequence: !input 'button_two_long_press'
- conditions:
- '{{ event == 2002 }}'
sequence: !input 'button_two_single_press'
- conditions:
- '{{ event == 2004 }}'
sequence: !input 'button_two_double_press'
- conditions:
- '{{ event == 3003 }}'
sequence: !input 'button_three_long_press'
- conditions:
- '{{ event == 3002 }}'
sequence: !input 'button_three_single_press'
- conditions:
- '{{ event == 3004 }}'
sequence: !input 'button_three_double_press'
- conditions:
- '{{ event == 4003 }}'
sequence: !input 'button_four_long_press'
- conditions:
- '{{ event == 4002 }}'
sequence: !input 'button_four_single_press'
- conditions:
- '{{ event == 4004 }}'
sequence: !input 'button_four_double_press'
3 Likes
Boris
March 24, 2021, 12:12pm
2
Hi @Peter1979
Thanks for this blueprint. I used it and it works great!
Boris
How do i use it, tried and does not work
Hi @Peter1979 ,
I have downloaded your blueprint and it is not working, can you teach me how to use it? I am new to thisâŚ
bipsen
(bipsen)
April 13, 2021, 9:22am
5
Hi
Tried to add the blueprint - no issue there.
Then added a persistent notification fort a single button short press⌠There I get 2 notifications?
Debugging in DeCONZ shows:
11:21:35:113 [INFO] - No button handler for: TS0044, unicast to: 0x0000, endpoint: 0x01, cluster: 0x0001, command: 0x0A, payload: 210020C8, zclSeq: 126
11:21:35:114 ZCL attribute report 0x5C0272FFFEC8951B for cluster: 0x0001, ep: 0x01, frame control: 0x08, mfcode: 0x0000
11:21:35:420 [INFO] - Button 1002 - TS0044, unicast to: 0x0000, endpoint: 0x01, cluster: ONOFF (0x0006), action: B1 short, payload: 00, zclSeq: 127
11:21:36:425 [INFO] - Button 1002 - TS0044, unicast to: 0x0000, endpoint: 0x01, cluster: ONOFF (0x0006), action: B1 short, payload: 00, zclSeq: 127
11:21:37:921 skip binding for attribute reporting of ep: 0x00 cluster 0x1000 (end-device might sleep)
So is the problem in DeCONZ ?
Sorry, i have no idea. Did you update DeConz and phoscon to the latest version?
bipsen
(bipsen)
April 13, 2021, 9:56am
7
Seems to be a bug in DeCONZ ⌠Will wait for a newer release
snhnic
(Snhnic)
May 22, 2021, 8:47am
8
I was able to add the device to conbee, but it sees the device as one button (4 gang device). How can I add itto have all four buttons? Or can I do that in Home assistant once it is connected?
How do I use this blueprint?
Thanks
1 Like
jemain
May 31, 2022, 7:26pm
10
For anyone who has a different model which doesnt show up within bueprint / automation:
open /config/blueprints/automation/Peter1979/deconz-tuya-ts0044-4-button-scene-switch.yaml
change the line :manufacturer: _TZ3000_vp6clf9d
to your model;
to
your model; for example: manufacturer: _TZ3000_wkai4ga5
3 Likes
Came here to post this, but see someone beat me to it. Can confirm this works as wellâŚgreat blueprint!
flash3d
October 25, 2022, 4:00pm
12
Added device through Deconz/Phoscon, Its working in HA cause I can see the device and the events fired. Its discovered in Phoscon/Deconz and HA as: _TZ3000_wkai4ga5
Changed the Manufacturer name in the blueprint yaml to: _TZ3000_wkai4ga5
Rebooted (donât know if required)
But when creating an automation through the blueprint i get: âNo matching devices foundâ
Got it working: copied and pasted the âmanufacturerâ name (_TZ3000_wkai4ga5) and the âmodelâ name (TS0044) and now its working.
platini76
(Platini76)
December 6, 2022, 1:09am
13
my blueprint:
blueprint:
name: deCONZ - Tuya TS0044 4-button scene switch
description: Automate your Tuya TS0044 4 button scene switch using deCONZ events.
domain: automation
input:
tuya_ts0044:
name: Tuya TS0044 4 button scene switch
description: Tuya TS0044 4 button scene switch to use
selector:
device:
integration: deconz
manufacturer: _TZ3000_wkai4ga5
model: TS0044
multiple: false
button_one_long_press:
name: Button 1 (long press)
description: Action to run on button 1 (lower-left) long press
default: []
selector:
action: {}
button_one_single_press:
name: Button 1 (single press)
description: Action to run on button 1 (lower-left) single press
default: []
selector:
action: {}
button_one_double_press:
name: Button 1 (double press)
description: Action to run on button 1 (lower-left) double press
default: []
selector:
action: {}
button_two_long_press:
name: Button 2 (long press)
description: Action to run on button 2 (lower-right) long press
default: []
selector:
action: {}
button_two_single_press:
name: Button 2 (single press)
description: Action to run on button 2 (lower-right) single press
default: []
selector:
action: {}
button_two_double_press:
name: Button 2 (double press)
description: Action to run on button 2 (lower-right) double press
default: []
selector:
action: {}
button_three_long_press:
name: Button 3 (long press)
description: Action to run on button 3 (upper-right) long press
default: []
selector:
action: {}
button_three_single_press:
name: Button 3 (single press)
description: Action to run on button 3 (upper-right) single press
default: []
selector:
action: {}
button_three_double_press:
name: Button 3 (double press)
description: Action to run on button 3 (upper-right) double press
default: []
selector:
action: {}
button_four_long_press:
name: Button 4 (long press)
description: Action to run on button 4 (upper-left) long press
default: []
selector:
action: {}
button_four_single_press:
name: Button 4 (single press)
description: Action to run on button 4 (upper-left) single press
default: []
selector:
action: {}
button_four_double_press:
name: Button 4 (double press)
description: Action to run on button 4 (upper-left) double press
default: []
selector:
action: {}
source_url: https://community.home-assistant.io/t/deconz-tuya-ts0044-4-button-scene-switch/289190
mode: restart
max_exceeded: silent
trigger:
- platform: event
event_type: deconz_event
event_data:
device_id: !input tuya_ts0044
action:
- variables:
event: '{{ trigger.event.data.event }}'
- choose:
- conditions:
- '{{ event == 1003 }}'
sequence: !input button_one_long_press
- conditions:
- '{{ event == 1002 }}'
sequence: !input button_one_single_press
- conditions:
- '{{ event == 1004 }}'
sequence: !input button_one_double_press
- conditions:
- '{{ event == 2003 }}'
sequence: !input button_two_long_press
- conditions:
- '{{ event == 2002 }}'
sequence: !input button_two_single_press
- conditions:
- '{{ event == 2004 }}'
sequence: !input button_two_double_press
- conditions:
- '{{ event == 3003 }}'
sequence: !input button_three_long_press
- conditions:
- '{{ event == 3002 }}'
sequence: !input button_three_single_press
- conditions:
- '{{ event == 3004 }}'
sequence: !input button_three_double_press
- conditions:
- '{{ event == 4003 }}'
sequence: !input button_four_long_press
- conditions:
- '{{ event == 4002 }}'
sequence: !input button_four_single_press
- conditions:
- '{{ event == 4004 }}'
sequence: !input button_four_double_press
and result is not expected:
hkusulja
(Hrvoje Kusulja)
August 10, 2023, 5:09pm
15
I just bought this Tuya 4-button Scene Switch (TS0044)
Using deCONZ and paired successfully, however in Home Assistant there is only Switch Battery entity, should there be other entities visible? In Logbook i see activity when fired event â1002â for 1st button single click.
I also imported blueprint from this thread address into Home Assistant 2023.8.1, but cannot select device in first step (no matching devices found)
What is wrong?
edit / FIXED:
modified blueprint file and set property:
manufacturer: _TZ3000_wkai4ga5
1 Like
Tee86
(Tee86)
June 4, 2024, 6:13pm
16
Thank you, 3 years later still working like a charm
Thanks! This worked for me too once I restarted Home Assistant after modifying the blueprint yaml.