# Solved: How switch color with one button push

**URL:** https://community.homey.app/t/solved-how-switch-color-with-one-button-push/137062
**Category:** Flows
**Tags:** advancedflow
**Created:** [May 25, 2025, 11:39am UTC](https://community.homey.app/t/solved-how-switch-color-with-one-button-push/137062 "2025-05-25T11:39:13Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Erik\_Lokenberg](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/erik_lokenberg/32/123669_2.png) [@Erik\_Lokenberg](https://community.homey.app/u/Erik_Lokenberg)
#### Post date: [May 25, 2025, 11:39am UTC](https://community.homey.app/t/solved-how-switch-color-with-one-button-push/137062/1 "2025-05-25T11:39:13Z")

</div>

Using Better Logic Library app will make switching colors easy. Using only one button lets you run through your self-defined colors ending with the off switch. See example using an advanced flow.  
This example can be expanded with multiple lights / colors if you want.

 ![Color switch one button](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/5/f5bdd50c32d96d1ebac402d03fe72a1e002dcc15.jpeg)

---

<div class="post-metadata">

### Author: ![Wim\_Post](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/wim_post/32/56793_2.png) [@Wim\_Post](https://community.homey.app/u/Wim_Post)
#### Post date: [May 25, 2025, 4:15pm UTC](https://community.homey.app/t/solved-how-switch-color-with-one-button-push/137062/2 "2025-05-25T16:15:08Z")

</div>

When the light turns off at the bottom line the value of ‘lampkleurwaarde’ is still 3. So when you press the button again both the top line and the bottom line are true. I’m curious what happens.

---

<div class="post-metadata">

### Author: ![Erik\_Lokenberg](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/erik_lokenberg/32/123669_2.png) [@Erik\_Lokenberg](https://community.homey.app/u/Erik_Lokenberg)
#### Post date: [May 25, 2025, 4:43pm UTC](https://community.homey.app/t/solved-how-switch-color-with-one-button-push/137062/3 "2025-05-25T16:43:27Z")

</div>

True. But when the light status is OFF and you press the button again the variable gets its new value 1 based on the light status.

---

<div class="post-metadata">

### Author: ![Mike1233](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mike1233/32/20991_2.png) [@Mike1233](https://community.homey.app/u/Mike1233)
#### Post date: [May 25, 2025, 7:39pm UTC](https://community.homey.app/t/solved-how-switch-color-with-one-button-push/137062/4 "2025-05-25T19:39:44Z")

</div>

For now it wil work i think.  
But when the flow gets more complex there is a change that there wil be some hickups.  
I would place a extra card behind Zet uit, Zet lampkleurwaarde naar 0.

---

<div class="post-metadata">

### Author: ![Erik\_Lokenberg](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/erik_lokenberg/32/123669_2.png) [@Erik\_Lokenberg](https://community.homey.app/u/Erik_Lokenberg)
#### Post date: [May 25, 2025, 7:47pm UTC](https://community.homey.app/t/solved-how-switch-color-with-one-button-push/137062/5 "2025-05-25T19:47:37Z")

</div>

This one below is way more complex and works flawless. Don’t see your point. And why put in more useless commands when it works? When all lights are off the variable will be reset to 1 the next push anyway.

 ![Color switch one button V1.0](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/8/782bef0116cc07d9c63c36a064ca534ffcf76450.jpeg)

---

<div class="post-metadata">

### Author: ![Wim\_Post](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/wim_post/32/56793_2.png) [@Wim\_Post](https://community.homey.app/u/Wim_Post)
#### Post date: [May 25, 2025, 9:13pm UTC](https://community.homey.app/t/solved-how-switch-color-with-one-button-push/137062/6 "2025-05-25T21:13:47Z")

</div>

This would be my flow: without the ALL-cards and with the standard logic-cards:

 ![Scherm­afbeelding 2025-05-25 om 23.11.52](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/7/776215db6f003754ab377bfe1245c21684edba1b.jpeg)

---

<div class="post-metadata">

### Author: ![Erik\_Lokenberg](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/erik_lokenberg/32/123669_2.png) [@Erik\_Lokenberg](https://community.homey.app/u/Erik_Lokenberg)
#### Post date: [May 25, 2025, 9:29pm UTC](https://community.homey.app/t/solved-how-switch-color-with-one-button-push/137062/7 "2025-05-25T21:29:37Z")

</div>

Similar. 👌
