Skip to content

Instantly share code, notes, and snippets.

@hummer2k
Created December 30, 2020 15:29
Show Gist options
  • Save hummer2k/96c923415f587358ea92d995fd614084 to your computer and use it in GitHub Desktop.
Save hummer2k/96c923415f587358ea92d995fd614084 to your computer and use it in GitHub Desktop.
Home Assistant Shelly i3 Blueprint
blueprint:
name: Shelly i3 Actions
description: Bind Shelly i3 button press actions
domain: automation
input:
switch:
name: Shelly i3 Switch
selector:
entity:
integration: shelly
domain: binary_sensor
single:
name: Single press
description: '.'
default: []
selector:
action: {}
double:
name: Double press
description: '. .'
default: []
selector:
action: {}
triple:
name: Triple press
description: '. . .'
default: []
selector:
action: {}
long:
name: Long press
description: '_'
default: []
selector:
action: {}
long-short:
name: Long-short press
description: '_ .'
default: []
selector:
action: {}
short-long:
name: Short-long press
description: '. _'
default: []
selector:
action: {}
mode: restart
max_exceeded: silent
trigger:
- platform: event
event_type: shellyforhass.click
event_data:
entity_id: !input switch
action:
- variables:
click_type: '{{ trigger.event.data.click_type }}'
- choose:
- conditions:
- '{{ click_type == "single" }}'
sequence: !input single
- conditions:
- '{{ click_type == "double" }}'
sequence: !input double
- conditions:
- '{{ click_type == "triple" }}'
sequence: !input triple
- conditions:
- '{{ click_type == "long" }}'
sequence: !input long
- conditions:
- '{{ click_type == "long-short" }}'
sequence: !input long-short
- conditions:
- '{{ click_type == "short-long" }}'
sequence: !input short-long
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment