Aqara switch single rocker 2016 blueprint

Here is the blueprint for the first generation of single rocker switch (lumi.sensor_86sw1)

blueprint:
  name: ZHA - Aqara Wireless Remote Switch (Single Rocker)
  description: Automate your Xiaomi Aqara Wireless Remote Switch (Single Rocker) using ZHA events.
  domain: automation
  input:
    aqara_mini_switch:
      name: Select the Aqara Wireless Remote Switch (Single Rocker)
      description: Aqara Wireless Remote Switch (Single Rocker)
      selector:
        device:
          integration: zha
          manufacturer: LUMI
          entity:
            domain: sensor
            device_class: battery
    button_single_press:
      name: Single Press
      description: Action to run on single press
      default: []
      selector:
        action:
    button_double_press:
      name: Double Press
      description: Action to run on double press
      default: []
      selector:
        action:
    button_long_press:
      name: Long Press
      description: Action to run when button is long pressed (held down)
      default: []
      selector:
        action:

mode: restart
max_exceeded: silent

trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_id: !input aqara_mini_switch

action:
- variables:
    command: '{{ trigger.event.data.command }}'
    attribute_name:  '{{ trigger.event.data.args.attribute_name }}'
    attribute_value:  '{{ trigger.event.data.args.value }}'
- choose:
  - conditions:
    - condition: or
      conditions: 
        - '{{ command == ''single'' }}'
        - '{{ command == ''attribute_updated'' and attribute_name == ''on_off'' and attribute_value == ''Bool.true'' }}'
    sequence: !input 'button_single_press'