Xiaomi Aqara Zigbee Switch WXKG12LM

Xiaomi Aqara Zigbee Switch WXKG12LM Home Assistant actions.

Supported actions:

  • Single click
  • Double click
  • Hold
  • Release
  • Shake

Simple configuration, when click / action X toggle the light.

Single click:

automation:
  - alias: Lamp Toggle
    trigger:
      - platform: state
        entity_id: sensor.[ID]_click
        to: 'single'
    action:
      - service: light.toggle
        entity_id: light.[ID]

Double click:

automation:
  - alias: Lamp Toggle
    trigger:
      - platform: state
        entity_id: sensor.[ID]_click
        to: 'double'
    action:
      - service: light.toggle
        entity_id: light.[ID]

Press and hold:

automation:
  - alias: lamp Toggle
    trigger:
      - platform: state
        entity_id: sensor.[ID]_action
        to: 'hold'
    action:
      - service: light.toggle
        entity_id: light.[ID]

Release:

automation:
  - alias: Lamp Toggle
    trigger:
      - platform: state
        entity_id: sensor.[ID]_action
        to: 'release'
    action:
      - service: light.toggle
        entity_id: light.[ID]

Shake:

automation:
  - alias: Lamp Toggle
    trigger:
      - platform: state
        entity_id: sensor.[ID]_action
        to: 'shake'
    action:
      - service: light.toggle
        entity_id: light.[ID]