Skip to content

Instantly share code, notes, and snippets.

@jwhb
Forked from Stayer/WXKG02LM.yaml
Last active April 7, 2023 18:10
Show Gist options
  • Save jwhb/3a5faa214b2b4e5a15112ba297bede46 to your computer and use it in GitHub Desktop.
Save jwhb/3a5faa214b2b4e5a15112ba297bede46 to your computer and use it in GitHub Desktop.
Zigbee2MQTT, SLS - Aqara Wall Wireless Switch Double Key Edition (WXKG02LM_rev2)
blueprint:
name: v2 Zigbee2MQTT, SLS - Aqara Wall Wireless Switch Double Key Edition (WXKG02LM_rev2)
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
multiple: false
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: {}
source_url: https://gist.github.com/Stayer/2065ad0814b980bf5cd47815c47a546d
mode: restart
max_exceeded: silent
trigger:
- platform: state
entity_id: !input switch
action:
- variables:
action: '{{ trigger.to_state.state }}'
- choose:
- conditions: '{{ action == ''single_left'' }}'
sequence: !input remote_button_left_press
- conditions: '{{ action == ''double_left'' }}'
sequence: !input remote_button_left_double_press
- conditions: '{{ action == ''hold_left'' }}'
sequence: !input remote_button_left_long_press
- conditions: '{{ action == ''single_right'' }}'
sequence: !input remote_button_right_press
- conditions: '{{ action == ''double_right'' }}'
sequence: !input remote_button_right_double_press
- conditions: '{{ action == ''hold_right'' }}'
sequence: !input remote_button_right_long_press
- conditions: '{{ action == ''single_both'' }}'
sequence: !input remote_button_both_press
- conditions: '{{ action == ''double_both'' }}'
sequence: !input remote_button_both_double_press
- conditions: '{{ action == ''hold_both'' }}'
sequence: !input remote_button_both_long_press
- conditions: '{{ action == ''release'' }}'
sequence: !input remote_button_release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment