Hello everyone,
I'm just starting out with HS3 (coming over from another HA platform). I'm so far very impressed with what I see.
I've been reading through this sub forum - especially the What do IF/OR-IF/AND-IF threads some more threads from the master list.
But I am having trouble with what sounds like a simple event... merging two IFs and an AND without redundant programming.
( IF (Condition-A) OR IF( Condition-B) ) AND IF (Condition-C) ) then do something.
The below WORKS, but seems to need a redundant statement.
Is this the correct way to do it?
Is there a better way to do it?
I ask, because I've developed a habit of creating a "disable" event for lot of my events, to either help debug, or when everything starts falling apart, "hit the switch" to stop automation from running.
So, a lot of my previous events are of the form
( IF (A is true) OR if (B is true) OR if (C is true) OR if (D is true) )
AND IF ( NOT DISABLE_SCRIPT)
Then { Do something}
With the HS3 interface, it looks like i would have to do a lot (what seems to be redundant statements) to get the same effect.
IF (A is true)
AND IF ( NOT DISABLE_SCRIPT)
OR if (B is true)
AND IF ( NOT DISABLE_SCRIPT)
OR if (C is true)
AND IF ( NOT DISABLE_SCRIPT)
OR if (D is true)
AND IF ( NOT DISABLE_SCRIPT)
Then { Do something}
What am I missing? Any help would be appreciated!
Thanks!
I'm just starting out with HS3 (coming over from another HA platform). I'm so far very impressed with what I see.
I've been reading through this sub forum - especially the What do IF/OR-IF/AND-IF threads some more threads from the master list.
But I am having trouble with what sounds like a simple event... merging two IFs and an AND without redundant programming.
( IF (Condition-A) OR IF( Condition-B) ) AND IF (Condition-C) ) then do something.
The below WORKS, but seems to need a redundant statement.
Is this the correct way to do it?
Is there a better way to do it?
I ask, because I've developed a habit of creating a "disable" event for lot of my events, to either help debug, or when everything starts falling apart, "hit the switch" to stop automation from running.
So, a lot of my previous events are of the form
( IF (A is true) OR if (B is true) OR if (C is true) OR if (D is true) )
AND IF ( NOT DISABLE_SCRIPT)
Then { Do something}
With the HS3 interface, it looks like i would have to do a lot (what seems to be redundant statements) to get the same effect.
IF (A is true)
AND IF ( NOT DISABLE_SCRIPT)
OR if (B is true)
AND IF ( NOT DISABLE_SCRIPT)
OR if (C is true)
AND IF ( NOT DISABLE_SCRIPT)
OR if (D is true)
AND IF ( NOT DISABLE_SCRIPT)
Then { Do something}
What am I missing? Any help would be appreciated!
Thanks!
Comment