Button to switch between preprogrammed different atmospheres

Greetings everyone, I’m seeking a solution to seamlessly transition between different atmospheres using just one button.
The objective is to effortlessly switch between various pre-programmed atmospheres using a single switch (Aqara), such as cozy or work, for instance.
For example, one press on the button triggers cozy lighting, and another press on the same button activates work lighting.
Could you assist me with this?

Do you mean one real button, or do you want a Virtual device button in the Homey app?

You mention an Aqara switch so I assume you mean a single physical button. For the sake of this response I’m going to assume you know how to create a flow that sets your lights to their desired settings for each ‘atmosphere’ but are wondering how to get the single switch to cycle through the available atmospheres.

The key point is that you need to introduce the concept of a state that is not just on or off, but can cycle through your atmospheres. To do this, create a variable. You could use a text variable to store the name of the current atmosphere. Set it initially to one of your atmosphere names.

Then create either a series of simple flows or one advanced flow triggered by your physical button press. The flow(s) needs to check that variable to find out which atmosphere you were already in. Depending on the answer, the flow should then set the lights for the next atmosphere in the cycle and finally set the variable to the name of the new current atmosphere. One of your atmospheres should be ‘off’.

Does that help?

1 Like

As an advanced flow it would look something like this

2 Likes

I put another variation on the multiple activities per button here…

Andy

1 Like

Thanks for helping me out!

1 Like

I’m seeking a comparable solution, but with a twist.

My dum lights have a logic that goes like this:

  1. 1x push = on/off
  2. push+hold = dim up to max and second time dim down to min

Id like to have a comparable push and hold for the smart lights. So not by pushing seperate, but by holding, something like dividing it up in 1%, 20%, 40% , 60% 80% and 100%. When holding it goes up every second untill 100%. Push and hold again and go down every second to 1%.

I think its probably possible with logic stuff, its just not my cup of tea. Can anybody tell me if this is kind of logically possible at all with a push button?

This is most certainly possible. The key thing to know is what lights you want to control like this and with what switch?

For example, if you use e.g. a Fibaro dimmer (or many many other equivalents) wired behind a momentary wall switch to control a ceiling light then this is the default behaviour out of the box with no ‘logic stuff’ needed.

Or if you use an Ikea smart bulb (or many many other equivalents) paired with a battery dimmer button then again this is the default behaviour with no logic stuff and in this case no wiring.

Or if you have any smart button where the Homey app provides a ‘When’ card for the event that the button is long-pressed and another for when it’s released then you can recreate this in Homey flows using ‘logic stuff’ (which is not that hard really and I can show you how to do if you want to go down this route).

Hey Jonathan,

Yeah you are spot on, but its a mix installed by a professional installer (robbshop). So we have physical switches (push buttons basically) from Buster + Punch that control either:

  • Fibaro dimmer (dims the dumb bulbs with one push button and smart bulbs with the other)
  • Hue Wall Switch (only controls smart lights)
  • Aqara T1 switch (so this one doesnt need a setup because only does on/off)

So basically my flows look something like this:

So basically the red part needs to be removed to make place for the thing I want to achieve:
On liong press Dimming the smart lights up in tranches and on another long press dimming them down in tranches.

I think you need something like this to replace the red part. You will need to install the Chronograph app from the Homey App Store. This starts a stop watch when you long press the button. The stop watch is stopped when you release the button from a long press, so that the lights stay at whatever dim level they reached when you release the button. Every extra second the stopwatch is running, the lights are dimmed to the next level.

EDIT: Actually, that should work for dimming up but not for the dimming back down again part. Let me have another think.

2 Likes

OK here you go. This should now do both up and down. Using the transition feature of the Chronograph app this time. You can adjust the speed at which the lights move between the steps by changing the duration of the two transition timers from 3s to whatever you want. This is the total time taken to get from the first to the last step if you keep holding the button.

Note that this doesn’t actually give you fixed size ‘steps’. It actually divides the total gap between whatever the current dim state is and the target one (either 100% or 0% depending if you’re dimming up or down) into 5 steps over 3s. You can adjust the number of steps as well if you want to go more smoothly. I tested this on one of my lights and I think the effect is quite nice.

1 Like

Hey This is quite smart. Ill try to emulate on my side. the first example is easy to understand, its the dimming back down that I dont fully understand…so lets try that by actually building it. Thanks in any case for doing this, this is great! :slight_smile:

Happy to help if you get stuck implementing it.