deCONZ - LoraTap Tuya TS0043 3 button remote

This is a blueprint for the LoraTap Tuya TS0043 3 button remote.
It supports single push, double push and long push actions.

LoraTap Tuya TS0043

blueprint:
  name: deCONZ - LoraTap Tuya TS0043 3 button remote
  description: Automate your LoraTap Tuya TS0043 3 button remote using deCONZ events.
  domain: automation
  input:
    loratap_tuya_ts0043:
      name: LoraTap Tuya TS0043 3 button remote
      description: LoraTap Tuya TS0043 3 button remote to use
      selector:
        device:
          integration: deconz
          manufacturer: _TZ3000_bi6lpsew
          model: TS0043
    button_one_long_press:
      name: Button 1 (long press)
      description: Action to run on button 1 long press
      default: []
      selector:
        action: {}
    button_one_single_press:
      name: Button 1 (single press)
      description: Action to run on button 1 single press
      default: []
      selector:
        action: {}
    button_one_double_press:
      name: Button 1 (double press)
      description: Action to run on button 1 double press
      default: []
      selector:
        action: {}
    button_two_long_press:
      name: Button 2 (long press)
      description: Action to run on button 2 long press
      default: []
      selector:
        action: {}
    button_two_single_press:
      name: Button 2 (single press)
      description: Action to run on button 2 single press
      default: []
      selector:
        action: {}
    button_two_double_press:
      name: Button 2 (double press)
      description: Action to run on button 2 double press
      default: []
      selector:
        action: {}
    button_three_long_press:
      name: Button 3 (long press)
      description: Action to run on button 3 long press
      default: []
      selector:
        action: {}
    button_three_single_press:
      name: Button 3 (single press)
      description: Action to run on button 3 single press
      default: []
      selector:
        action: {}
    button_three_double_press:
      name: Button 3 (double press)
      description: Action to run on button 3 double press
      default: []
      selector:
        action: {}
mode: restart
max_exceeded: silent
trigger:
- platform: event
  event_type: deconz_event
  event_data:
    device_id: !input 'loratap_tuya_ts0043'
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'

1 Like

Great ! Thanks it really helps me !! In deconz it couldn’t find buttons with your blueprint it was perfect !

Thanks a lot !
I’m a total newbie, but thanks to you I managed to have a Tuya 3-gang switch operational with a Conbee 2 on my Raspbian.

Nevertheless, I’m struggling with a configuration:
I would like to use a single touch to change the state of a light bulb (so same action on Smart Switch to switch it ON or OFF depending on the state). Everything I tested so far I have my bulb changing state 2 times to come back to the previous state. How can I configure this ?

Thx for your work it helped !

need this automation to mqqt

any solution for debouncing? each action is fired two times

Hi
I don’t understand how did HA recognizes the device, my deconz does’nt how do I use the blueprint to do it?