Skip to content

Commit 9fba415

Browse files
soldagLandrash
authored andcommitted
Added documentation for flic smart button component. (home-assistant#1527)
* Added documentation for flic component.
1 parent c5add9f commit 9fba415

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
layout: page
3+
title: Flic Smart Button
4+
description: "Instructions how to integrate flic buttons within Home Assistant."
5+
date: 2016-12-02 22:03
6+
sidebar: true
7+
comments: false
8+
sharing: true
9+
footer: true
10+
logo: flic.png
11+
ha_category: Binary Sensor
12+
ha_iot_class: "Local Push"
13+
ha_release: 0.33.4
14+
---
15+
16+
The `flic` platform allows you to connect with multiple [flic](https://flic.io) smart buttons.
17+
18+
The platform does not directly interact with the buttons, but communicates with the flic service that manages the buttons. The service can run on the same instance as home assistant or any other reachable machine. For setup instructions visit the [GitHub repository](https://github.com/50ButtonsEach/fliclib-linux-hci#quick-start) of the service.
19+
20+
### {% linkable_title Configuration %}
21+
22+
```yaml
23+
# Example configuration.yaml entry
24+
binary_sensor:
25+
- platform: flic
26+
```
27+
28+
Configuration variables:
29+
30+
- **host** (*Optional*): The IP or hostname of the flic service server. (default: `localhost`)
31+
- **port** (*Optional*): The port of the flic service. (default: `5551`)
32+
- **discovery** (*Optional*): If `true`, the component is configured to constantly scan for new buttons. (default: `true`)
33+
34+
35+
#### {% linkable_title Discovery %}
36+
37+
If discovery is enabled, you can add a new button by pressing it for at least 7s. The button will be paired with the flic service and added to Home Assistant. Otherwise, you have to manually pair it with the flic service. The Home Assistant platform will not scan for new buttons and will only connect to buttons already paired.
38+
39+
40+
#### {% linkable_title Events %}
41+
42+
The flic component fires `flic_click` events on the bus. You can capture the events and respond to them in automation scripts like this:
43+
44+
```yaml
45+
# Example configuration.yaml automation entry
46+
automation:
47+
- alias: Turn on lights in living room if flic is pressed once
48+
trigger:
49+
platform: event
50+
event_type: flic_click
51+
event_data:
52+
button_name: flic_81e4ac74b6d2
53+
click_type: single
54+
action:
55+
service: homeassistant.turn_off
56+
entity_id: group.lights_livingroom
57+
```
58+
59+
Event data:
60+
61+
- **button_name**: The name of the button, that triggered the event.
62+
- **button_address**: The bluetooth address of the button, that triggered the event.
63+
- **click_type**: The type of click. Possible values are `single`, `double` and `hold`.
19.6 KB
Loading

0 commit comments

Comments
 (0)