deCONZ - Moes Smart Zigbee Scene Switch

Used this blueprint: deCONZ - LoraTap Tuya TS0043 3 button remote for the Moes Tuya/Zigbee Scene Switch button, using deconz_events, I was only able to see Single presses but I believe in the app, there’s more functionality. Feel Free to contribute

blueprint:
  name: deCONZ - Moes Smart Zigbee Scene Switch
  description: Automate your Moes 4 button Scene Switch remote using deCONZ events.
  domain: automation
  input:
    moes_tuya_ts004f:
      name: Moes Tuya TS004F Scene Switch
      description: Moes Tuya TS004F 4 button switch
      selector:
        device:
          integration: deconz
          manufacturer: _TZ3000_xabckq1v
          model: TS004F
    button_one_single_press:
      name: Button 1 (single press)
      description: Action to run on button 1 single 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_three_single_press:
      name: Button 3 (single press)
      description: Action to run on button 3 single press
      default: []
      selector:
        action: {}
    button_four_single_press:
      name: Button 4 (single press)
      description: Action to run on button 4 single press
      default: []
      selector:
        action: {}
  source_url:
mode: restart
max_exceeded: silent
trigger:
- platform: event
  event_type: deconz_event
  event_data:
    device_id: !input 'moes_tuya_ts004f'
action:
- variables:
    event: '{{ trigger.event.data.event }}'
- choose:
  - conditions:
    - '{{ event == 1002 }}'
    sequence: !input 'button_one_single_press'
  - conditions:
    - '{{ event == 2002 }}'
    sequence: !input 'button_two_single_press'
  - conditions:
    - '{{ event == 3002 }}'
    sequence: !input 'button_three_single_press'
  - conditions:
    - '{{ event == 4002 }}'
    sequence: !input 'button_four_single_press'

Hello,
import of the blueprint does not work :frowning:

1 Like

Hi @ctowers,

thank you for providing the blueprint. It works fine now, after I removed the empty line “scource_url:”.

My events for double and long press are registered, so I enhanced the blueprint.

blueprint:
  name: deCONZ - Moes Smart Zigbee Scene Switch
  description: Automate your Moes 4 button Scene Switch remote using deCONZ events.
  domain: automation
  input:
    ts0044_8:
      name: Moes Tuya TS004F Scene Switch
      description: Moes Tuya TS004F 4 button switch
      selector:
        device:
          integration: deconz
          manufacturer: _TZ3000_wkai4ga5
          model: TS0044
    button_one_single_press:
      name: Button 1 (single press)
      description: Action to run on button 1 single 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_three_single_press:
      name: Button 3 (single press)
      description: Action to run on button 3 single press
      default: []
      selector:
        action: {}
    button_four_single_press:
      name: Button 4 (single press)
      description: Action to run on button 4 single press
      default: []
      selector:
        action: {}
    button_one_long_press:
      name: Button 1 (long press)
      description: Action to run on button 1 long 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_three_long_press:
      name: Button 3 (long press)
      description: Action to run on button 3 long press
      default: []
      selector:
        action: {}
    button_four_long_press:
      name: Button 4 (long press)
      description: Action to run on button 4 long 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_double_press:
      name: Button 2 (double press)
      description: Action to run on button 2 double 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: {}
    button_four_double_press:
      name: Button 4 (double press)
      description: Action to run on button 4 double press
      default: []
      selector:
        action: {}        
mode: restart
max_exceeded: silent

trigger:
- platform: event
  event_type: deconz_event
  event_data:
    device_id: !input 'ts0044_8'
    #device_id: 'caf26e30336c25629db0955b77e8d58a'

action:
- variables:
    event: '{{ trigger.event.data.event }}'
- choose:
  - conditions:
    - '{{ event == 1002 }}'
    sequence: !input 'button_one_single_press'
  - conditions:
    - '{{ event == 2002 }}'
    sequence: !input 'button_two_single_press'
  - conditions:
    - '{{ event == 3002 }}'
    sequence: !input 'button_three_single_press'
  - conditions:
    - '{{ event == 4002 }}'
    sequence: !input 'button_four_single_press'
  - conditions:
    - '{{ event == 1003 }}'
    sequence: !input 'button_one_long_press'
  - conditions:
    - '{{ event == 2003 }}'
    sequence: !input 'button_two_long_press'
  - conditions:
    - '{{ event == 3003 }}'
    sequence: !input 'button_three_long_press'
  - conditions:
    - '{{ event == 4003 }}'
    sequence: !input 'button_four_long_press'
  - conditions:
    - '{{ event == 1004 }}'
    sequence: !input 'button_one_double_press'
  - conditions:
    - '{{ event == 2004 }}'
    sequence: !input 'button_two_double_press'
  - conditions:
    - '{{ event == 3004 }}'
    sequence: !input 'button_three_double_press'
  - conditions:
    - '{{ event == 4004 }}'
    sequence: !input 'button_four_double_press'
1 Like