Skip to content

Instantly share code, notes, and snippets.

@Stayer
Last active April 7, 2023 18:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Stayer/2065ad0814b980bf5cd47815c47a546d to your computer and use it in GitHub Desktop.
Save Stayer/2065ad0814b980bf5cd47815c47a546d to your computer and use it in GitHub Desktop.
Zigbee2MQTT, SLS - Aqara Wall Wireless Switch Double Key Edition (WXKG02LM)
blueprint:
name: v2 Zigbee2MQTT, SLS - Aqara Wall Wireless Switch Double Key Edition (WXKG02LM) actions
description: >
Define actions your Aqara Wall Wireless Switch Double Key Edition using Zigbee2MQTT or SLS.
For your button entity, choose the right sensor with your button name and the entity id which ends with '_action', e.g. 'sensor.kitchen.button_action'
domain: automation
input:
switch:
name: Aqara Wall Wireless Switch Double Key Edition sensor entity
description: Sensor forAqara Wall Wireless Switch Double Key Edition to use (Use sensor with entity_id ends with _action)
selector:
entity:
domain: sensor
remote_button_left_press:
name: Left Single Press
description: Action to run on single left press
default: []
selector:
action:
remote_button_left_double_press:
name: Left Double Press
description: Action to run on double left press
default: []
selector:
action:
remote_button_left_long_press:
name: Left Long Press
description: Action to run on long left press
default: []
selector:
action:
remote_button_right_press:
name: Right Single Press
description: Action to run on single right press
default: []
selector:
action:
remote_button_right_double_press:
name: Right Double Press
description: Action to run on double right press
default: []
selector:
action:
remote_button_right_long_press:
name: Right Long Press
description: Action to run on long right press
default: []
selector:
action:
remote_button_both_press:
name: Both Single Press
description: Action to run on single both press
default: []
selector:
action:
remote_button_both_double_press:
name: Both Double Press
description: Action to run on double both press
default: []
selector:
action:
remote_button_both_long_press:
name: Both Long Press
description: Action to run on long both press
default: []
selector:
action:
remote_button_release:
name: Release
description: Action to run on release after long press
default: []
selector:
action:
mode: restart
max_exceeded: silent
trigger:
- platform: state
entity_id: !input 'switch'
attribute: action
action:
- variables:
action: "{{ trigger.to_state.state }}"
- choose:
- conditions: "{{ action == 'left' }}"
sequence: !input remote_button_left_press
- conditions: "{{ action == 'left_double' }}"
sequence: !input remote_button_left_double_press
- conditions: "{{ action == 'left_long' }}"
sequence: !input remote_button_left_long_press
- conditions: "{{ action == 'right' }}"
sequence: !input remote_button_right_press
- conditions: "{{ action == 'right_double' }}"
sequence: !input remote_button_right_double_press
- conditions: "{{ action == 'right_long' }}"
sequence: !input remote_button_right_long_press
- conditions: "{{ action == 'both' }}"
sequence: !input remote_button_both_press
- conditions: "{{ action == 'both_double' }}"
sequence: !input remote_button_both_double_press
- conditions: "{{ action == 'both_long' }}"
sequence: !input remote_button_both_long_press
- conditions: "{{ action == 'release' }}"
sequence: !input remote_button_release
@Gaara81
Copy link

Gaara81 commented Jan 2, 2023

dont work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment