Flic: Support ignoring individual click types. (#1568)

This commit is contained in:
Sören Oldag 2016-12-18 09:53:48 +01:00 committed by Fabian Affolter
parent 347f40ffa6
commit a153336e3d

View File

@ -30,6 +30,7 @@ Configuration variables:
- **host** (*Optional*): The IP or hostname of the flic service server. (default: `localhost`) - **host** (*Optional*): The IP or hostname of the flic service server. (default: `localhost`)
- **port** (*Optional*): The port of the flic service. (default: `5551`) - **port** (*Optional*): The port of the flic service. (default: `5551`)
- **discovery** (*Optional*): If `true`, the component is configured to constantly scan for new buttons. (default: `true`) - **discovery** (*Optional*): If `true`, the component is configured to constantly scan for new buttons. (default: `true`)
- **ignored_click_types**: List of click types whose occurrence should not trigger and `flic_click` event.
#### {% linkable_title Discovery %} #### {% linkable_title Discovery %}
@ -61,3 +62,7 @@ Event data:
- **button_name**: The name of the button, that triggered the event. - **button_name**: The name of the button, that triggered the event.
- **button_address**: The bluetooth address of the button, that triggered the event. - **button_address**: The bluetooth address of the button, that triggered the event.
- **click_type**: The type of click. Possible values are `single`, `double` and `hold`. - **click_type**: The type of click. Possible values are `single`, `double` and `hold`.
##### {% linkable_title Ignoring Click Types %}
For some purposes it might make sense to exclude a specific click type from triggering click events. For example when ignoring double clicks, pressing the button twice fast results in two `single` instead of a `double` click event. This is very useful for applications where you want to click fast.