[SCENES] Scene with multiple conditions AND actions (toggle type)

Hello everyone,

I imagine this has already been mentioned, maybe not in feature requests but rather in discussions around scenes.

I didn’t know exactly what title to give, so we can change it if needed.

I’d like to be able to control turning my light (or something else) on and off with a push button, where the effect would depend on a certain context.

Here’s a very simple explanation:

At the moment, if I want to create this, I’m forced to use 2 scenes, whereas it would seem much more logical and efficient to be able to manage it in a single one.

What do you think?

In fact, in this case the simplest thing is a toggle action.

We invert the state of a binary value.

2 Likes

I have exactly this case when activating my alarm system because I set up a visual switch that I control with 2 scenes.

Yes that would be less heavy than the system I imagined!
Is it possible in Gladys to just say something like: toggle light?
Doesn’t Gladys expect a specific action like toggle light ON?

I didn’t mention it in my post but I’m expecting the same with my alarm as well.
I’d like to use the same command (a long press on a push button) to activate / deactivate the alarm :wink:

@VonOx is working on it, I think it will be available soon.

Yes the click button is in the next release (it’s already on the main branch)

@Tlse-vins @vonox I think on that point we misunderstood each other (even if the idea is a good one).
I was talking about pressing a physical Zigbee button that I already own :ok_hand:

Yes, we understood each other even if we’re drifting away from the original topic :wink:

1 Like

Hello.
Like you, I had created 2 Scenes to turn a room on by pressing a button SONOFF SNZB-01

1st scene to turn off
Trigger : Sonoff Button Click >= 1
Get last state : Switch bedroom1
Continue only if : Switch bedroom1 = 1
Control a device : Switch bedroom1 = OFF

2nd Scene to turn on:
Trigger : Sonoff Button Click >= 1
Get last state : Switch bedroom1
Continue only if : Switch bedroom1 = 0
Control a device : Switch bedroom1 = ON

Everything worked until today; it wasn’t very responsive but it worked.
Today I changed my coordinator Sonoff key for TubesZB
And this one seems too fast, too sensitive — the two scenes execute in parallel: if the light is on it turns off then immediately turns on again; if it is off it turns on and immediately turns off. I tried adding a timer but it changes nothing.
With a staggered delay between the two scenes, one works but not the other.

So a scene that inverts the switch value seems like the only solution.
The other solution would be to use the « else » condition that would call the 2nd scene, but that function does not exist yet.

Is this request still relevant now that we have the actions:

? :slight_smile:

1 Like

I think you can close.