Toggle between Hue Scenes


#1

Hi there

Been using Homey for 6 months and what a great project. The thing i’m stuck with is how to create a flow that can toggle between the Hue Scenes in a specific room.

Right now I have z-wave ZHC5010 wall switches from Logic that activates different Hue bulbs and a scpedic scene depending on what time of day it is. So far so good, but if I’m not pleased with the scene choice, i’d like to activate a different one with continous press of same button.

Essentially i’d like to setup a flow with a toggle action everytime i press the same button, which goes through the Hue scenes for the specific room.

Anyone have the silver bullet for that?

Thanks :wink:


#2

U could make a number variable. With standard logic card or Better Logic card.
U make a few flows with the scenes like:
WHEN button is pressed–> AND number variable = 0 THEN set scene 1 AND set number variable to 1
WHEN button is pressed–> AND number variable = 1 THEN set scene 2 AND set number variable to 2
WHEN button is pressed–> AND number variable = 2 THEN set scene 3 AND set number variable to 3
WHEN button is pressed–> AND number variable = 3 THEN set scene 4 AND set number variable to 0

Just a screenie of what the last flow would look like. Don’t watch the name of the buttons or variables plz, it’s just to give u an idea of what the flows should look like.


#3

Hi Roco…

Thanks a lot. I have now tried setting these flows up, but the loop is causing me some issues. I see the light reacting and eg. wants to go to a light scene but is forced back to a dark scene. I cant see where the issue is, but I have a question before we get to that part.

In my Better Logic setup I can not define the varible name the same as you have. It says the varible already exists. Thats why as you see I have different name for each varible. Is this the rootcause for the issue i have in the loop, and how can I adjust it?


#4

An ex of one of the flows…


#5

Well, u just need 1 number variable. So just “knap2spot” will do in this case. That’s the variable u gonna use in all ur flows. Maybe add a delay to the “set variable” cards to make sure the correct scene is activated. The delay can be set with the little symbol in the upper right corner of the card.


#6

Got it working !! :muscle:

Thanks a lot


#7

Anytime! Glad u got it working.