1 botton = 4 functions?

Would it be possible to make a flow or write a script where it was possible to use 1 button to control a hue bulb like below. The button has only one flow card “button activated”

Short press = ON / OFF
First long press = Dimming UP
Second long press = Dimming Down

best regards
Michael

Edit: I read too quickly :stuck_out_tongue_winking_eye:
It’s impossible EDIT AGAIN: - with that switch to implement a long-press function.

If the button does not distinguish between press and long press, there’s no programming language or home automation system going to help you out.

Also you should not aim to creare user unterfaces that only you know how to use. How would guests in your house know what to do? Provide a user manual?

Why not invest in a double button that allows for these kinds of things, such as Aqara Opple? Cheap and very versatile. Separate buttons for on/dim up and off/dim down are universally understood.

Or there are also push/turn dim knob solutions (e.g. from Robbshop) which are more one-button like and also universal.

Hey Kongedam,

I personally user in my house: Fibaro Dimmer 2 With Push-button in place of each wallsocket-lightswitch.
I than have Aeotec WallMote Quad throughout the house as extra light switch in each room (at the bed or where ever).

The fibaro+push let me:

  • Press (short)
  • Press long (and release-trigger) for dimming
  • Double press (lights on full/half)
  • Tripple press (with second light=lights on full)

The WallMote has about the same functions:

  • Press (short)
  • Press long (defaults the light to a certain percentage)
  • You can swipe on the panel to dim, where the panel is boom=0% and top=100%, so you know how much you dim straigt away.

These combinations work very well.
Offcource there are other devicees to get what you want, but i agree with Edwin, try to make it as default/normal as possible, and more people will enjoy it.

The more (in-your-head)-manuals you have or will need, the less smart it will feel/be :wink:

1 Like

Thanks you just gave me an idea, I will try to use math and then call a flow.
Maybe H.O.O.P. (Hope) can help me out.
But it’s very hard to understand it :slight_smile:

At least now I found out how to turn on off light, with one button and a simple yes/no bolan

The reason for the 4 button control is because we have been used to this programming at our house. House was built 15 years ago with LK IHC and here I programmed all light switches this way. It is actually quite easy to learn.
1 button push On/Off = normal switch
Hold button for dimming (nobody know that accept for your family) but they don’t need to know as long as they can turn light on and off :wink:

You can make more flows with delays and a counter. First make a number variable called buttoncount. Then First flow(call it e.g. buttoncount) WHEN button is pressed, AND buttoncount is 0 THEN buttoncount +1, THEN Start a flow called buttonpressed1 with a delay of 1 sec, THEN set button to 0 with a delay of 30 sec

Second flow(call it e.g. buttoncount2), WHEN button is pressed, AND buttoncount is 1, then buttoncount +1,THEN Start a flow called buttonpressed2 with a delay if 1 second, Then set buttoncount to 0 with a delay of 30 sec etc etc

Now you can make your actually wanted flows, First flow called buttonpressed1, WHEN this flow is started, AND buttoncount is 1, THEN light on

Second flow called buttonpressed2, WHEN this flow is started, and buttoncount is 2, THEN lights off etc etc

This is a way to try if it works with a 1 button switch. But there are cheap switches and buttons that work better as above solution. But maybe it suits your needs.

H.o.o.p. is something you have to dive into, but when you start to get the idea, it adds lots of new flow editing possibilities.
So long-press is not possible with your switch type, but this came up today, after reading Marcel Ubels neat tip:
I have KaKu wall-transmitter-switches, which functions like this out-of-stock:
1st push ON = ON,
2nd push ON = Dim up,
3rd push ON = hold Dim value,
4th push ON = Dim down,
5th push ON = hold Dim value.
Then if you push again, the step with the 2nd push starts again.
They use an other button to switch light off.
So if you have a button which only sends “button pressed”, it has to be possible to imitate the above. The off command can be added as ‘6th push’. Then, the 7th push = the 1st push.

If you want to stick to the ‘house style switching’ you should buy a switch like Arie suggests.

Hey Peter, I did create a flow to do this:

Example Using one button for multiple purposes (multiple fired)

This one triggered directly but multiple times, i’ve also created a debounce flow (which waits a second before firing, and will only fire one time) but that is on Kongedam’s Homey: He needs to share the other example’s :wink:

1 Like

Example Shared, thanks to Arie_J_Godschalk

Example Using one button for multiple purposes (waits a second before firing)

1 Push = ON/OFF
2 Push = Dim 50%
3 Push = Dim 100%

1 Like