# 1 botton = 4 functions?

**URL:** <https://community.homey.app/t/1-botton-4-functions/45277>\
**Category:** Questions & Help\
**Created:** [March 26, 2021, 10:10pm UTC](https://community.homey.app/t/1-botton-4-functions/45277 "2021-03-26T22:10:33Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kongedam](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kongedam/32/35807_2.png) [@Kongedam](https://community.homey.app/u/Kongedam)\
**Post date:** [March 26, 2021, 10:10pm UTC](https://community.homey.app/t/1-botton-4-functions/45277/1 "2021-03-26T22:10:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [March 26, 2021, 10:31pm UTC](https://community.homey.app/t/1-botton-4-functions/45277/2 "2021-03-26T22:31:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Edwin\_D](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/edwin_d/32/136417_2.png) [@Edwin\_D](https://community.homey.app/u/Edwin_D)\
**Post date:** [March 26, 2021, 10:53pm UTC](https://community.homey.app/t/1-botton-4-functions/45277/3 "2021-03-26T22:53:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [March 27, 2021, 5:36am UTC](https://community.homey.app/t/1-botton-4-functions/45277/4 "2021-03-27T05:36:36Z")

</div>

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 😉

---

<div class="post-metadata">

**Author:** ![Kongedam](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kongedam/32/35807_2.png) [@Kongedam](https://community.homey.app/u/Kongedam)\
**Post date:** [March 27, 2021, 7:24am UTC](https://community.homey.app/t/1-botton-4-functions/45277/5 "2021-03-27T07:24:36Z")

</div>

Thanks you just gave me an idea, I will try to use math and then call a flow.  
Maybe [H.O.O.P. (Hope)](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709) can help me out.  
But it’s very hard to understand it 🙂

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 😉

---

<div class="post-metadata">

**Author:** ![Marcel\_Ubels](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marcel_ubels/32/18860_2.png) [@Marcel\_Ubels](https://community.homey.app/u/Marcel_Ubels)\
**Post date:** [March 27, 2021, 11:31am UTC](https://community.homey.app/t/1-botton-4-functions/45277/6 "2021-03-27T11:31:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [March 27, 2021, 1:17pm UTC](https://community.homey.app/t/1-botton-4-functions/45277/7 "2021-03-27T13:17:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [March 27, 2021, 9:09pm UTC](https://community.homey.app/t/1-botton-4-functions/45277/8 "2021-03-27T21:09:36Z")

</div>

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

[Example Using one button for multiple purposes (multiple fired)](https://community.homey.app/t/h-o-o-p-hope-examples/45114/9)

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 😉

---

<div class="post-metadata">

**Author:** ![Kongedam](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kongedam/32/35807_2.png) [@Kongedam](https://community.homey.app/u/Kongedam)\
**Post date:** [March 28, 2021, 6:18am UTC](https://community.homey.app/t/1-botton-4-functions/45277/9 "2021-03-28T06:18:24Z")

</div>

Example Shared, thanks to [Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)

### [Example Using one button for multiple purposes (waits a second before firing)](https://community.homey.app/t/h-o-o-p-hope-examples/45114/12)

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