ZHA - MOES Wireless Remote Switch (Double Rocker)

Blueprint to support the MOES Wireless Remote Switch (Double Rocker) using ZHA.

image

As far as I could find MOES is another generic Zigbee Tuya smart home “company” from China. Its Zigbee manufacture information is _TZ3000_5e235jpa, and at the time that I bought it at Aliexpress, it was the cheapest alternative.

Here is a link* to the product page that I bought: 1/2/3 Gang Tuya ZigBee Wireless Scene Smart Light Switch Push Button Controller Automation Scenario Smart Life Alexa Google Home|Smart Remote Control| - AliExpress
*it is an affiliated link

Supported actions:

  • Single Press
  • Double Press

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

Git link: blueprints_repo/moes_double_rocker.yaml at cab231edbd05820c070de5c6a38f140868cbbbcb · gmlupatelli/blueprints_repo · GitHub

2 Likes

Do you now a blueprint for the single rocker model?

1 Like

Hi, I adapted your Blueprint for model _TZ3000_dfgbtub0 (TS0042 - 2 button model) and added support for long press on both buttons :wink:

blueprint:
  name: ZHA - MOES Wireless Remote Switch (Double Rocker)
  description: Automate your MOES Wireless Remote Switch (Double Rocker) using ZHA
    events.
  domain: automation
  source_url: https://github.com/gmlupatelli/blueprints_repo/blob/ff26cebe9ed8a3f99298fa34d4725341ed92bd60/moes_controler/moes_double_rocker.yaml
  input:
    remote_switch:
      name: Select the MOES Wireless Remote Switch (Double Rocker)
      description: MOES Wireless Remote Switch (Double Rocker)
      selector:
        device:
          integration: zha
          manufacturer: _TZ3000_dfgbtub0
          entity:
            domain: sensor
            device_class: battery
          multiple: false
    button_single_press_left:
      name: Single Press Left
      description: Action to run on single press
      default: []
      selector:
        action: {}
    button_double_press_left:
      name: Double Press Left
      description: Action to run on double press
      default: []
      selector:
        action: {}
    button_long_press_left:
      name: Long Press Left
      description: Action to run on long press
      default: []
      selector:
        action: {}
    button_single_press_right:
      name: Single Press Right
      description: Action to run on single press
      default: []
      selector:
        action: {}
    button_double_press_right:
      name: Double Press Right
      description: Action to run on double press
      default: []
      selector:
        action: {}
    button_long_press_right:
      name: Long Press Right
      description: Action to run on long press
      default: []
      selector:
        action: {}
trigger:
- platform: event
  event_type: zha_event
  event_data:
    device_id: !input remote_switch
action:
- variables:
    endpoint_id: '{{ trigger.event.data.endpoint_id | int }}'
    command: '{{ trigger.event.data.command }}'
- choose:
  - conditions:
    - '{{ command == ''remote_button_short_press'' and endpoint_id == 1}}'
    sequence: !input button_single_press_left
  - conditions:
    - '{{ command == ''remote_button_double_press'' and endpoint_id == 1}}'
    sequence: !input button_double_press_left
  - conditions:
    - '{{ command == ''remote_button_long_press'' and endpoint_id == 1}}'
    sequence: !input button_long_press_left
  - conditions:
    - '{{ command == ''remote_button_short_press'' and endpoint_id == 2}}'
    sequence: !input button_single_press_right
  - conditions:
    - '{{ command == ''remote_button_double_press'' and endpoint_id == 2}}'
    sequence: !input button_double_press_right
  - conditions:
    - '{{ command == ''remote_button_long_press'' and endpoint_id == 2}}'
    sequence: !input button_long_press_right
mode: restart
max_exceeded: silent

Thank you for your Blueprint !!!

Cool that you have a version of it with long press support. Mine goes into pairing mode if I long press any button…lol…Chinese engineering and construction at its best.