Flic Hub (Flic buttons) integration using Flic Hub SDK and HA binary sensors/automations


how do we fix this?

1 Like

I would also like to know!


local_only: true

to your webhook trigger definition did it for me…

1 Like

Hi guys

Total HA newbie here. The last piece of my setup jigsaw, for now, is to get my Flic integrated.

This page and instructions look great, thanks for taking the time to share. I’m not getting any success though. I’ve added the automation in automation.YAML file but nothing happening.

Would anyone be happy to help me?

Hello everyone,

I got my Flic Buttons working with flicd they are working most of the time just fine. The range is very bad and my Bluetooth dongle only supports 5 Buttons max. I got a flic hub laying around.

Is the methode with the flic hub with the sdk and webhooks working localy?

I’m not that advanced, can someone help me out?

Hi all. what is the webhook?

1 Like

This is great! Thanks @diegomorales17

This is absolutely awesome! :smiley:
I am still trying to figure out how to manage automation based on click types. I only use one help but it seems to switch a light on on click and off on hold without any click type config… which is neat but I want to add a double click function.

I edited line 16 of the flic hub code to make a more detailed log output so you can see the button name and press types. (handy for when you do not know what button it is and what the name you gave it was…)

		console.log("Activity log - request status: " + res.statusCode +", " + button.name +", " + clickType);

Thanks again, this has made flic so much more awesome.

If you haven’t solved it, you need to change double_click to double-click
it’s correct in the first code block, but has a typo in the 3rd code block

Thanks for pointing it out. I have modified all code blocks to use _ instead of - wherever possible to standardize the naming convention further.

I am getting an issue with my config file once adding it.

Can you see what is wrong here?

template: !include_dir_merge_list templates/

  - platform: foxess
    name: FoxESS1
    username: ****
    password: *****
    deviceID: 59e48e7c-95ff-47c8-ae4a-****
  - platform: foxess
    name: FoxESS2
    username: *****
    password: ****
    deviceID: b9d1760b-6869-4027-a241-******
  - trigger:
    - platform: webhook
      webhook_id: flicserver-binary_sensor.flic1

      - unique_id: "binary_sensor.flic1_button"
        name: "[binary_sensor.flic1] Button"
        state: "on"
        auto_off: 0.1
            click_type: "{{ trigger.json.click_type }}"
            battery: "{{ trigger.json.battery_status }}"

If you have a MQTT server you could follow this guide:

I just tried it and it’s all local!


Can anyone tell me what is going wrong here? I have removed ‘template’ because apparently it only needs to say it once in the config file and it says it at the top and also when I do add ‘template’ it says duplicate key.

Does anyone look at this anymore? I have managed to sort out the above.

I have done everything @diegomorales17 said in their first post yet I cannot get it to work. The flic button does not seem to exist anywhere in my HA and the automation says there is an error.

Am I meant to remove or leave the square brackets? Am I meant to remove or leave the ’ surrounding the bits I have to type?

I have moved to MQTT for my flic buttons and it’s working great!
I’m using this:

1 Like

Can you share what you did please?

I wanted to share an integration I have made for Flic Hub. It uses a TCP socket between the hub and HA. The integration will automatically find the hub or can be configured using the UIin HA.

Let me know what you think!

I had a question about your Flichub tool, about how i can trigger automations with single, double and hold button presses

I can’t add the integration to HA. I have installed the components through HACS, I have activated SDK on the Flic Hub and I have created a module based on “tcpserver.js” and started the module. I can see connection attempts from the HA IP but it disconnects and in HA GUI I get an error message: “Unable to connect to device”.

Made by JohNan - GitHub - JohNan/pyflichub-tcpclient
The server should have started now!
Waiting for connections…
Connection from
Client disconnected:


Have you double checked the port? The default port in the script is 8124 and it looks like you have set 8125 in HA.

But if you see the connection attempt the port should be correct. Can you enable debug logs for the integration and post them here? I think you have to enable them manually by adding it to configuration.yml

  default: info
    pyflichub.client: debug
    custom_components.flichub: debug