Is it possible to use one button on a scenecontroller to dim a light up and down?
Each button has three possible states. Pushed, double pushed and held.
The held function will repeat the held to the controller every second until it’s released.
Now I have made to turn on/off with one click, depending on the state.
Dim to a certain level if held.
Turn to 100% when double clicked.
Anyone who has a idea?
I’m using Core for the moment.
You could set a Variable that flip/flops to choose the action of the button. All done through Core.
Example:
If button pushed
and Variable is True
then when true do
Dim lights up to 100%
Set variable to False
then when false do
Dim lights down to 0%
Set variable to True
Each push would change the state of the Switch.
You could also set the double push to change the Variable state to True/False.
Drop the Variable change from the single push and just choose which mode you wold like.
The only downside to that is you dont really know which state you are in without some type of visual Q(Could be a light color, or Virtual switch in app, Audio Text).
I would personally do:
Single push…Turn light on or off
Double push Toggle True/False State for Hold Dimming with a visual Q.
Hold to Dim 0/100%
Expanding further on this, you could also set it up the where when you double click it, It sets dimmer level to 25% and then next variable to 50%. Double click again, its sets to 50% and then next variable 75%. Double click again, it sets to 75% and next variable 100%. Double click again, it sets to 100% and next variable to 0%. Then you could just choose what level you like by double click a set number of times. Dimmer levels could be set to whatever % you prefer of course.
Thanks for the pointer. Like yourself I know have all the logic in one piston. I have an Xiaomi button (single button) in the bedroom that executes the the “Good Night” routine when held, that kills all lights, sets mode to night, turns all the thermostats down and then sets the landing light to 10% (for the kids). Using the piston logic I can then control that light during the night and the day. Not bad for a single button.Thanks again.
I tried to build your piston (using the same ZRC-90 controller - great
device indeed), but there is a strange effect taking place.
The on-off toggle is working.
If I use the double click action to set the level at 100% it works, but
then it automatically starts dimming down in steps to 20%.
I guess I made a mistake. Can you have a look at the piston please?