Scenes - Complex conditions configuration

When setting scenes, IF conditions are limited to a single ANY or ALL operation that connects multiple e.g. device states.

Is there a plan and possibility to make the conditions configuration to support more complex scenarios - e.g. like adding parenthesis to group multiple conditions joined with diverse ANY/ALL operations?

The other way around, or also a convenient addition to the complex condition would be:

  1. Group scenes so the ones relating to each other belong to the same group - in the Scenes listing
  2. Inside a single scene as today, to have multiple sub-scenes -N x (IF(ANY or ALL)+THEN(multiple actions))
1 Like

Hi there, thanks for the idea, loop @natalia.long to put this on the request list and evaluate by our APP team, haven’t a schedule yet.

1 Like

Any chance to get this in the product backlog soon?

Hi @yitie or @natalia.long, any chance to have multiple conditions surrounded with parentheses in scenes (with the support of multiple conditions over the same device)?

Would you mind that share an examples of real scenario configurations with me?

Example 1: Start the sprinkler pump from a tank with TH10 (with humidity sensors) when humidity is below a certain level, or manually with the R5 remote switch, but only if the separate tank water pump (to fill the tank), controlled with M5, is not running.

IF (AND)
   M5_TankPump.OFF
   IF (ANY)
      R5_Remote.Channel1.Clicked   
      TH10_Sprinkler.Humidity < 50%    
   ENDIF
ENDIF
THEN
   M5_TankPump.ON
   TH10_Sprinkler.ON
END

Example 2: Stop the DualR3 in motor mode (for blinds) when going UP or DOWN by using an R5 remote or RF_Bridge with a remote, or when reaching some percentage in DualR3.

IF (AND)
   IF (ANY)
      DualR3.Open
      DualR3.Close
   ENDIF
   IF (ANY)
      R5.Channel1.Clicked
      RF_Bridge.Remote1.Button1
      DualR3.Percentage = 20%
      DualR3.Percentage = 70%
   ENDIF
ENDIF
THEN
   DualR3.Stop
END

Got it !

This means differentiating between instantaneous changes to the trigger condition and a maintained state, which is more advanced, but the logic is also relatively complex, so I’m not sure if everyone will be confused during use.

When setting up a scene, in the triggers section, the same device can appear only once but in the case of IF type “any condition is met” have multiple states of the same device.

E.g. I want to stop motor blinds after 20 seconds regardless if they are going up or down. With the current app version, I would need to create two separate scenes one for up, and the second for down.

This would be an awesome addition to the Scenes - Complex conditions configuration - #3 by nescha, if it will ever get implemented.

1 Like

Yes, or if i want the device to delay n number of seconds before it goes on or off when back online.
Or many other reasons. IScenes must include the same device in the then secrion

Since the one of the latest releases (4.24.0. or 4.26.0.) there exists the possibility to have the same device multiple times in THEN section and having that same device in the IF section - but only once.

I would like in IF section to have the same device multiple times.

Hi @yitie or @Daniel_Zhan, any chance to have multiple conditions of the same device connected with ANY operator?

Would you please give us more specific information about what device that hoping to have this feature implemented? and how do you want to set up with the scenes?

The most simple one would be a DualR3 as a motor for blinds, e.g. when clicked on a remote button for UP or DOWN.

// Update: Invalid example
IF (ANY)
   DualR3.Open
   DualR3.Close
THEN
   DualR3.Stop

This eliminates the need for a 3rd button to control the blinds.

This makes sense for any multichannel device, such as DualR3, 4CH Pro R3, etc…

Having ELSE would be also very beneficial:

UP button

// Update: Invalid example
IF (ANY)
   DualR3.Open
   DualR3.Close
THEN
   DualR3.Stop
ELSE
   DualR3.Open

With such a scene configuration, the curtains can never actually perform opening or closing. The curtains are stopped by the scene in the moment witch they are opened/closed

@songal, you are correct, my bad. Here is the updated logic:

IF (AND)
   R5.Channel1.Clicked
   IF (ANY)
      DualR3.Open
      DualR3.Close
THEN
   DualR3.Stop

Or a more complex example with a mix of multiple IF-THE-ELSE blocks, where ANY is replaced with OR, AND/OR is added after the condition in the IF line.

IF R5.Channel1.Clicked OR R5.Channel2.Clicked THEN
   IF DualR3.Open OR DualR3.Close THEN
      DualR3.Stop
   ELSE IF DualR3.Stop THEN
      IF R5.Channel1.Clicked THEN
         DualR3.Open
      ELSE // Optionally for readability - IF R5.Channel2.Clicked THEN
         DualR3.Close

This would be a single scene for one blind to assign two remote buttons to control Open/Close and Stop actions.

Currently, I need 6 scenes to fulfill this logic for a single-blind. I have more than 10 blinds in 3 different apartments. And scenes are not groupable per apartment. A bit of a mess and an administration nightmare.

This is why I also suggested in another post to wrap some logic in templates or functions, with some arguments, that users can name and define themselves:

dualR3MotorWithR5(SomeDualR3, SomeR5, ButtonOpen, ButtonClose)