Shelly Plus 1 Button Action Blueprint

I created a blueprint for easily creating an automation from the various button presses on a Shelly Plus 1. It can probably be used for other single-button Shelly devices as well, but it’s not tested. If you successfully used it on other Shellys, please let me know below and I’ll update the description.

The foundation for this was the Blueprint shared by @Danieldz in this topic: Shelly i4 4 Buttons actions - so thanks!

Supported Devices

Generally all one-input Shelly devices should work. Below are the ones where this blueprint has been confirmed working.

Please report if you are successfully using the blueprint with other one-input Shelly devices, such as:

Version log

v3 (2025-10-12)

  • Updated the device selector, removed manufacturer: Shelly and replaced with integration: shelly
  • Fixed the post to allow import (was broken before)

v2 (2025-01-05)

  • Fixed bug, replaced tripple with triple

The Blueprint

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

blueprint:
  name: Shelly Plus 1 Button actions
  description: |
    This blueprint is for the Shelly Plus 1 setup as button. It is for general
    use.
    Note: Best set the `Input/Output settings` to `Detached - Input is separated/not changing state of the output/relay` on the Shelly: `http:/<shelly-ip>/#/input/0/settings/io-settings`. 
    In case you still want to control the primary output directly from the Shelly, create a local action: `http:/<shelly-ip>/#/input/0/create-action`.
  domain: automation
  input:
    button:
      name: button
      description: Choose Shelly Plus 1
      selector:
        device:
          integration: shelly
          #model: SNSW-001X16EU #commented as for some users the devices are not showing
          multiple: false
    down:
      name: Down
      description: Action to run when BUTTON DOWN
      default: []
      selector:
        action: {}
    up:
      name: Up
      description: Action to run when BUTTON UP
      default: []
      selector:
        action: {}
    single:
      name: Single short press
      description: Action to run when SHORT press
      default: []
      selector:
        action: {}
    double:
      name: Double short press
      description: Action to run when DOUBLE SHORT press
      default: []
      selector:
        action: {}
    triple:
      name: Triple short press
      description: Action to run when TRIPLE SHORT press
      default: []
      selector:
        action: {}
    long:
      name: Long press
      description: Action to run when LONG press
      default: []
      selector:
        action: {}
  source_url: https://community.home-assistant.io/t/shelly-plus-1-button-action-blueprint/786242
mode: restart
max_exceeded: silent
trigger:
  - platform: device
    device_id: !input button
    domain: shelly
    type: btn_down
    subtype: button1
    id: btn_down
  - platform: device
    device_id: !input button
    domain: shelly
    type: btn_up
    subtype: button1
    id: btn_up
  - platform: device
    device_id: !input button
    domain: shelly
    type: single_push
    subtype: button1
    id: btn_single
  - platform: device
    device_id: !input button
    domain: shelly
    type: double_push
    subtype: button1
    id: btn_double
  - platform: device
    device_id: !input button
    domain: shelly
    type: long_push
    subtype: button1
    id: btn_long
action:
  - choose:
      - conditions:
          - condition: trigger
            id: btn_down
        sequence: !input down
      - conditions:
          - condition: trigger
            id: btn_up
        sequence: !input up
      - conditions:
          - condition: trigger
            id: btn_single
        sequence: !input single
      - conditions:
          - condition: trigger
            id: btn_double
        sequence: !input double
      - conditions:
          - condition: trigger
            id: btn_triple
        sequence: !input triple
      - conditions:
          - condition: trigger
            id: btn_long
        sequence: !input long
1 Like

That is a great one! Thanks for this! I have 15 of those iin my house and this blueprint saved a lot of work!

1 Like

I tried this but the only entities it seems to allow me to select are the Shelly diagnostic ones (over temperature etc). I couldn’t select the input button and manually pasting it didn’t work.

You mean in the device drop-down?

Yep. I should have taken a screenshot but got Grok3 to create an Automation from scratch for me instead.

Cant seem to import this blueprint @ahue

Manually importing worked well. Please can you make a 2 button version as well. Much appreciated.

Should work now again. Let me know if you can confirm.

Which Shelly devices are you targeting with the 2 button version?

Should work with the change in the device selector (v3). Let me know if this solves the drop down selection for you.

Nice template, only for triple the trigger is missing and so not working.
After adding it manually it is working.

Excellent catch, trigger should be. Can you confirm from your fix @TheMystery ?

  - platform: device
    device_id: !input button
    domain: shelly
    type: triple_push
    subtype: button1
    id: btn_triple

Yes, I have the same.