Skip to content

Added documentation for flic smart button component. #1527

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 6, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions source/_components/binary_sensor.flic.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
layout: page
title: Flic Smart Button
description: "Instructions how to integrate flic buttons within Home Assistant."
date: 2016-12-02 22:03
sidebar: true
comments: false
sharing: true
footer: true
logo: flic.png
ha_category: Binary Sensor
ha_iot_class: "Local Push"
ha_release: 0.33.4
---

The `flic` platform allows you to connect with multiple [flic](https://flic.io) smart buttons.

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.

### {% linkable_title Configuration %}

```yaml
# Example configuration.yaml entry
binary_sensor:
- platform: flic
```

Configuration variables:

- **host** (*Optional*): The IP or hostname of the flic service server. (default: `localhost`)
- **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`)


#### {% linkable_title Discovery %}

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.


#### {% linkable_title Events %}

The flic component fires `flic_click` events on the bus. You can capture the events and respond to them in automation scripts like this:

```yaml
# Example configuration.yaml automation entry
automation:
- alias: Turn on lights in living room if flic is pressed once
trigger:
platform: event
event_type: flic_click
event_data:
button_name: flic_81e4ac74b6d2
click_type: single
action:
service: homeassistant.turn_off
entity_id: group.lights_livingroom
```

Event data:

- **button_name**: The name 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`.
Binary file added source/images/supported_brands/flic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.