for my daughters room I am trying to create some flows for different “light scenes”. Well, the scenes are not really the problem, of cause. I want to trigger these flows by using a Hue dimming switch.
1x Dimming Switch
3x White Ambiance lights
Power on pressed for the first time: first bulb goes on with 1% dimmlevel
Power on pressed the second time: first and second bulb are on with 1% dimmlevel
Power on pressed the third time: first, second and third bulb are on with 1% dimmlevel
Power on pressed the fourth time: all three bulbs go on dimmlevel 25%
Power on pressed the fifth time: all three bulbs go on dimmlevel 50%
Power on pressed the sixth time: all three bulbs go on dimmlevel 100%
Power of pressed: all bulbs go off
I have tried to realise this with Better Logic. Each time the power on button is pressed I increment a variable by 1.
For each state of the variable I created a flow.
If variable = 1 than power on bulb 1
If variable = 2 than power on bulb 1 + 2
and so on.
If I press power on 4 times (variable = 4) Homey tries to work on what I told him in state 1, 2 and 3 (for sure he does because the variable had 1, 2 and 3 when the variable changed or was set) while he is working on state 4. So, I have a litte mess in the lighting.
Do someone has a similar issue and found a solution for that? Or simply could help with the error in my logic?