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:
- Shelly Plus 1PM
- Shelly 1 Gen3
- Shelly 1PM Gen3
- Shelly 1 Gen4
- Shelly 1 Gen4 ANZ
- Shelly 1PM Gen4
- Shelly 1PM Gen4 ANZ
- …
Version log
v3 (2025-10-12)
- Updated the device selector, removed
manufacturer: Shellyand replaced withintegration: shelly - Fixed the post to allow import (was broken before)
v2 (2025-01-05)
- Fixed bug, replaced
tripplewithtriple
The Blueprint
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
