Shelly Blueprint for any Shelly with 2 Detached inputs

Blueprint for all shelly devices with 2 detached inputs as Shelly 1L and 2L Gen 3, 2PM gen3/4 and many more. Based on i4 blueprint by Daniel.

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

blueprint:
  name: Shellywith 2 Buttons actions
  description: This blueprint is for the Shelly with 2 inputs
    use.
  domain: automation
  input:
    button:
      name: button
      description: Choose Shelly
      selector:
        device:
          manufacturer: Shelly
          multiple: false
    downb1:
      name: Down Button 1
      description: Action to run when SHORT press
      default: []
      selector:
        action: {}
    upb1:
      name: up Button 1
      description: Action to run when SHORT press
      default: []
      selector:
        action: {}
    singleb1:
      name: single short press Button 1
      description: Action to run when SHORT press
      default: []
      selector:
        action: {}
    doubleb1:
      name: double short press Button 1
      description: Action to run when DOUBLE SHORT press
      default: []
      selector:
        action: {}
    longb1:
      name: long press Button 1
      description: Action to run when LONG press
      default: []
      selector:
        action: {}
    downb2:
      name: Down Button 2
      description: Action to run when SHORT press
      default: []
      selector:
        action: {}
    upb2:
      name: up Button 2
      description: Action to run when SHORT press
      default: []
      selector:
        action: {}
    singleb2:
      name: single short press Button 2
      description: Action to run when SHORT press
      default: []
      selector:
        action: {}
    doubleb2:
      name: double short press Button 2
      description: Action to run when DOUBLE SHORT press
      default: []
      selector:
        action: {}
    longb2:
      name: long press Button 2
      description: Action to run when LONG press
      default: []
      selector:
        action: {}
  source_url: https://community.home-assistant.io/t/shelly-blueprint-for-any-shelly-with-2-detached-inputs/909999
mode: restart
max_exceeded: silent
trigger:
- platform: device
  device_id: !input button
  domain: shelly
  type: btn_down
  subtype: button1
  id: btn1_down
- platform: device
  device_id: !input button
  domain: shelly
  type: btn_up
  subtype: button1
  id: btn1_up
- platform: device
  device_id: !input button
  domain: shelly
  type: single_push
  subtype: button1
  id: btn1_single
- platform: device
  device_id: !input button
  domain: shelly
  type: double_push
  subtype: button1
  id: btn1_double
- platform: device
  device_id: !input button
  domain: shelly
  type: long_push
  subtype: button1
  id: btn1_long
- platform: device
  device_id: !input button
  domain: shelly
  type: btn_down
  subtype: button2
  id: btn2_down
- platform: device
  device_id: !input button
  domain: shelly
  type: btn_up
  subtype: button2
  id: btn2_up
- platform: device
  device_id: !input button
  domain: shelly
  type: single_push
  subtype: button2
  id: btn2_single
- platform: device
  device_id: !input button
  domain: shelly
  type: double_push
  subtype: button2
  id: btn2_double
- platform: device
  device_id: !input button
  domain: shelly
  type: long_push
  subtype: button2
  id: btn2_long
action:
- choose:
  - conditions:
    - condition: trigger
      id: btn1_down
    sequence: !input downb1
  - conditions:
    - condition: trigger
      id: btn1_up
    sequence: !input upb1
  - conditions:
    - condition: trigger
      id: btn1_single
    sequence: !input singleb1
  - conditions:
    - condition: trigger
      id: btn1_double
    sequence: !input doubleb1
  - conditions:
    - condition: trigger
      id: btn1_long
    sequence: !input longb1
  - conditions:
    - condition: trigger
      id: btn2_down
    sequence: !input downb2
  - conditions:
    - condition: trigger
      id: btn2_up
    sequence: !input upb2
  - conditions:
    - condition: trigger
      id: btn2_single
    sequence: !input singleb2
  - conditions:
    - condition: trigger
      id: btn2_double
    sequence: !input doubleb2
  - conditions:
    - condition: trigger
      id: btn2_long
    sequence: !input longb2

Hi, I’m a HA newbie, and it is the first time importing a blueprint, so please cut me some slack (:

I imported your automation, but I’m unable to select my shelly.
I’m using the shelly wave 2 pm relays.
Can you please advise on how to proceed?

Thank you for your time (and patience)

Best regards

Doesnt work, errors in the blueprint.