blueprint:
  name: Oppo 6 button switch controls
  domain: automation
  input:
    action_sensor:
    button_1_single:
      default: []
    button_1_double:
      default: []
    button_1_triple:
      default: []
    button_1_release:
      default: []
    button_2_single:
      default: []
    button_2_double:
      default: []
    button_2_triple:
      default: []
    button_2_release:
      default: []
    button_3_single:
      default: []
    button_3_double:
      default: []
    button_3_triple:
      default: []
    button_3_release:
      default: []
    button_4_single:
      default: []
    button_4_double:
      default: []
    button_4_triple:
      default: []
    button_4_release:
      default: []
    button_5_single:
      default: []
    button_5_double:
      default: []
    button_5_triple:
      default: []
    button_5_release:
      default: []
    button_6_single:
      default: []
    button_6_double:
      default: []
    button_6_triple:
      default: []
    button_6_release:
      default: []

mode: queued
trigger:
  platform: state
  entity_id: !input action_sensor
action:
  - choose:
    - conditions: "{{ trigger.to_state.state == 'button_1_single' }}"
      sequence: !input button_1_single

    - conditions: "{{ trigger.to_state.state == 'button_1_double' }}"
      sequence: !input button_1_double

    - conditions: "{{ trigger.to_state.state == 'button_1_triple' }}"
      sequence: !input button_1_triple

    - conditions: "{{ trigger.to_state.state == 'button_1_release' }}"
      sequence: !input button_1_release

    - conditions: "{{ trigger.to_state.state == 'button_2_single' }}"
      sequence: !input button_2_single

    - conditions: "{{ trigger.to_state.state == 'button_2_double' }}"
      sequence: !input button_2_double

    - conditions: "{{ trigger.to_state.state == 'button_2_triple' }}"
      sequence: !input button_2_triple

    - conditions: "{{ trigger.to_state.state == 'button_2_release' }}"
      sequence: !input button_2_release

    - conditions: "{{ trigger.to_state.state == 'button_3_single' }}"
      sequence: !input button_3_single

    - conditions: "{{ trigger.to_state.state == 'button_3_double' }}"
      sequence: !input button_3_double

    - conditions: "{{ trigger.to_state.state == 'button_3_triple' }}"
      sequence: !input button_3_triple

    - conditions: "{{ trigger.to_state.state == 'button_3_release' }}"
      sequence: !input button_3_release

    - conditions: "{{ trigger.to_state.state == 'button_4_single' }}"
      sequence: !input button_4_single

    - conditions: "{{ trigger.to_state.state == 'button_4_double' }}"
      sequence: !input button_4_double

    - conditions: "{{ trigger.to_state.state == 'button_4_triple' }}"
      sequence: !input button_4_triple

    - conditions: "{{ trigger.to_state.state == 'button_4_release' }}"
      sequence: !input button_4_release

    - conditions: "{{ trigger.to_state.state == 'button_5_single' }}"
      sequence: !input button_5_single

    - conditions: "{{ trigger.to_state.state == 'button_5_double' }}"
      sequence: !input button_5_double

    - conditions: "{{ trigger.to_state.state == 'button_5_triple' }}"
      sequence: !input button_5_triple

    - conditions: "{{ trigger.to_state.state == 'button_5_release' }}"
      sequence: !input button_5_release

    - conditions: "{{ trigger.to_state.state == 'button_6_single' }}"
      sequence: !input button_6_single

    - conditions: "{{ trigger.to_state.state == 'button_6_double' }}"
      sequence: !input button_6_double

    - conditions: "{{ trigger.to_state.state == 'button_6_triple' }}"
      sequence: !input button_6_triple

    - conditions: "{{ trigger.to_state.state == 'button_6_release' }}"
      sequence: !input button_6_release
