I have two Flic buttons by my bed. Each one supports three actions: click, double-click and hold. I use buttons so I don’t wake my wife up talking/whispering to Alexa.
I had five actions set up already but wanted to do another three. This is how I used Homey advanced flows to get three actions from a Flic double-press:
- Turn a light on at 10% with warm colour
- Turn it up to 100% with brightest colour
- Turn it off
First I installed the Chronograph app. It gives some elegant ways to work with timers.
I then created my advanced flow…
When executed, it looks to see if my 15 second timer is running:
- If the timer is not running it looks to see if the lamp is on:
If the lamp is on, it turns it off setting the dim level back to 10% (so, if I turn the light on from Alexa it comes on at 10%)
If the lamp is off, it turns it on with a dim setting and starts the 15 second timer - If the timer is running it turns the brightness up and stops the timer.
So the first double-click turns it on at a dim setting. A second double-click within 15 seconds turns the brightness up. A double click after 15 seconds turns the lamp off again.
If you wanted to do two (or more) completely different things you could adapt the approach to say:
- Start a timer with the first button press
- If the button is pressed again within the timer interval, execute task 1 and stop the timer
- If the timer expires, execute task 2
To get this working with a Flic button I had to add a simple flow like this…
It’s annoying I had to do this, but Flic can’t execute advanced flows directly (unless you know otherwise).
I then added Homey to my Flic mini-hub:
- Log in to the hub with the Flic app
- Tap the three dots icon
- Tap Providers
- Use the Homey link to connect the hub to Homey
(If you’ve already done that, use the same sequence to ‘Refresh Homeys and Flows’ so the Flic hub recognises the new flow.)
I then clicked the relevant button icon in the Flic app, selected the relevant action (double-click in my case), selected Homey, selected my simple flow, clicked ‘Save action’.
Works a treat. Smugness abounds.
Andy