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:
Group scenes so the ones relating to each other belong to the same group - in the Scenes listing
Inside a single scene as today, to have multiple sub-scenes -N x (IF(ANY or ALL)+THEN(multiple actions))
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)?
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
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.
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.
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?
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
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: