deCONZ - Xiaomi Aqara WXKG12LM Smart Wireless Mini Switch with Gyroscope

Blueprint to support the Aqara Wireless Mini Switch with Gyroscope. (sp3cialck blueprint fork)

The supported actions is for the “lumi.sensor_switch.aq3” version :

blueprint:
  name: deCONZ - Xiaomi Aqara WXKG12LM Wireless Switch (lumi.sensor_switch.aq3)
  description: Control anything using Xiaomi Aqara WXKG12LM (single button) remote
  domain: automation
  input:
    remote:
      name: Remote
      description: Button to use
      selector:
        device:
          integration: deconz
          manufacturer: LUMI
    remote_button_short_press:
      name: Single press
      default: []
      selector:
        action: {}
    remote_button_double_press:
      name: Double press
      default: []
      selector:
        action: {}
    remote_button_long_press:
      name: Hold
      default: []
      selector:
        action: {}
    remote_button_long_release:
      name: Hold release
      default: []
      selector:
        action: {}
    remote_gyro_activated:
      name: Shake 
      default: []
      selector:
        action: {}
mode: restart
max_exceeded: silent
trigger:
- platform: event
  event_type: deconz_event
  event_data:
    device_id: !input 'remote'
action:
- variables:
    event: '{{ trigger.event.data.event }}'
- choose:
  - conditions:
    - '{{ event == 1002 }}'
    sequence: !input 'remote_button_short_press'
  - conditions:
    - '{{ event == 1004 }}'
    sequence: !input 'remote_button_double_press'
  - conditions:
    - '{{ event == 1001 }}'
    sequence: !input 'remote_button_long_press'
  - conditions:
    - '{{ event == 1003 }}'
    sequence: !input 'remote_button_long_release'
  - conditions:
    - '{{ event == 1007 }}'
    sequence: !input 'remote_gyro_activated'
2 Likes