Last active
March 19, 2023 23:01
-
-
Save kristofer84/917fe88461cf3dd2a0bf6dfa04daaf67 to your computer and use it in GitHub Desktop.
Home Assistant Flic button integration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: Flic button | |
description: | | |
Create automations to react to Flic button clicks. Triggered by event type 'flic_click'. | |
The event data should contain flic_name and click_type (single/double/hold). | |
domain: automation | |
input: | |
flic_name: | |
name: Flic name | |
description: Name of the Flic button sent in the event. | |
default: "flic" | |
single: | |
name: Button pressed 1 time | |
description: Actions to run for a single click. | |
default: [] | |
selector: | |
action: | |
double: | |
name: Button pressed 2 times | |
description: Actions to run for a double click. | |
default: [] | |
selector: | |
action: | |
hold: | |
name: Button hold | |
description: Actions to run when holding the button. | |
default: [] | |
selector: | |
action: | |
mode: parallel | |
max: 10 | |
max_exceeded: silent | |
trigger: | |
platform: event | |
event_type: flic_click | |
event_data: | |
button_name: !input flic_name | |
condition: | |
action: | |
- variables: | |
click_type: "{{ trigger.event.data.click_type }}" | |
- choose: | |
- conditions: "{{ click_type == 'single' }}" | |
sequence: !input single | |
- choose: | |
- conditions: "{{ click_type == 'double' }}" | |
sequence: !input double | |
- choose: | |
- conditions: "{{ click_type == 'hold' }}" | |
sequence: !input hold |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment