Skip to content

Instantly share code, notes, and snippets.

@tubit
Last active January 22, 2023 21:42
Show Gist options
  • Save tubit/9153956c520308c88571621af33406dd to your computer and use it in GitHub Desktop.
Save tubit/9153956c520308c88571621af33406dd to your computer and use it in GitHub Desktop.
zigbee2mqtt_Ikea_Tradfi_Switch
blueprint:
name: 'Z2M IKEA Shortcut Button E1812'
description: "Blueprint for Ikea Tradfri Shortcut Button E1812. You can put several actions to each single press, double press and log press."
domain: automation
input:
button:
name: Remote
description: IKEA Shortcut Button to use (e.g sensor.kitchen_remote_action)
selector:
entity:
integration: mqtt
domain: sensor
multiple: false
single:
name: Action when On sended
description: Action to run when SHORT press
default: []
selector:
action: {}
double:
name: Action when Off sended
description: Action to run when DOUBLE SHORT press
default: []
selector:
action: {}
long:
name: Action when Brightness_move_up sended
description: Action to run when LONG press
default: []
selector:
action: {}
released:
name: Action when Brightness_stop sended
description: Action to run when LONG press RELEASED
default: []
selector:
action: {}
mode: restart
max_exceeded: silent
trigger:
- platform: state
entity_id:
- !input button
to: "off"
id: "off"
- platform: state
entity_id:
- !input button
to: "on"
id: "on"
- platform: state
entity_id:
- !input button
to: "brightness_move_up"
id: "long_down"
- platform: state
entity_id:
- !input button
to: "brightness_stop"
id: "stop"
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: "off"
sequence: !input double
- conditions:
- condition: trigger
id: "on"
sequence: !input single
- conditions:
- condition: trigger
id: "long_down"
sequence: !input long
- conditions:
- condition: trigger
id: "stop"
sequence: !input released
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment