macromark Can we end this conversation and get the feature put in and tested? I think the majority of us want If-Then logic (every programming language uses this for a reason)... and some of us would like CASE added since its a efficient and effective way to represent that type of logic.
Announcement
Collapse
No announcement yet.
Feedback Request: Conditional Actions
Collapse
This topic is closed.
X
X
-
OK so... putting the conditions above the actions appears to be the preferred configuration for the Actions section. Also, I like the suggestion of putting "THEN" blocks between the condition/action groups to better separate them. It was also suggested that differentiating the "master trigger" from the conditions below by using "WHEN" instead of "IF" might be a good option. I have also changed the color coding of the master trigger to red to further emphasize this. Have a look and let me know what you think.
- Likes 7
Comment
-
Originally posted by macromark View PostOK so... putting the conditions above the actions appears to be the preferred configuration for the Actions section. Also, I like the suggestion of putting "THEN" block between the condition/action groups to better separate them. It was also suggested that differentiating the "master trigger" from the conditions below by using "WHEN" instead of "IF" might be a good option. I have also changed the color coding of the master trigger to red to further emphasize this. Have a look and let me know what you think.
stefxx
Comment
-
Originally posted by stefxx View Post
Looks great! Too bad you've ignored the requests for ELSE, but hey I guess that will be the next most voted requested feature . Seriously, if it gets implemented as shown here, it will be a great addition to HS4!
BTW, not ignoring the "else"... would be a good "round 2" addition.
- Likes 2
Comment
-
Regarding the ELSE request
I can see this as being problematic:IF the Time Is X (Will run at that time only)Do SomethingELSEDo Something Else
This is only one example of the many instances where Else causes problems. It seems the use of a second Event is more straightforward for Else uses which are actually opposite triggers.
As for the display, I found randy 's option to be unintuitive. It seems that is sating "Set These If this is also true." I do not believe most people think this way. I would suggest, therefore, the following, minus the red symbols.:
Also, I would suggest that the last IF Conditional Block (marked with a star) Is run if the first IF Conditional Block (marked with a diamond) is executed and sets the Outside Garage Overhead light On and the Garage Door is Open. Meaning if, at the time of the initial Trigger, this light was Off and it is a Weekday, it is now On and therefore any Condition following the one marked with a diamond evaluates the light as being On as it is now set to On from said diamond Condition. (hopefully this makes sense) If this logic is not used and the Initial Values of all Devices Prior to the Event being Triggered are used for all Conditional Evaluations, then there is no reason for the Action which Starts a Timer needs to be in the middle of the groupings. In that case, all Actions made with no Conditions should happen first to further simplify reading the Actions.
Karl S
HS4Pro on Windows 10
1070 Devices
56 Z-Wave Nodes
104 Events
HSTouch Clients: 3 Android, 1 iOS
Google Home: 3 Mini units, 1 Pair Audios, 2 Displays
Comment
-
Originally posted by macromark View PostOK so... putting the conditions above the actions appears to be the preferred configuration for the Actions section. Also, I like the suggestion of putting "THEN" blocks between the condition/action groups to better separate them. It was also suggested that differentiating the "master trigger" from the conditions below by using "WHEN" instead of "IF" might be a good option. I have also changed the color coding of the master trigger to red to further emphasize this. Have a look and let me know what you think.
Comment
-
I like the WHEN and additional color coding. That was posted while I was making my last response. I also like the THEN breaks.
My comment regarding the Evaluation of Devices in each Conditional Block is still apparently open, though, and I think not understood in my first posting of such. In the example from macromark, if an earlier block in this same event opened the Outside Garage Door there becomes 2 possibilities for the last Condition:- The Garage Door was closed before the Event starts and is evaluated as Closed
- The Garage Door has since been Opened and therefore evaluates as Open
Karl S
HS4Pro on Windows 10
1070 Devices
56 Z-Wave Nodes
104 Events
HSTouch Clients: 3 Android, 1 iOS
Google Home: 3 Mini units, 1 Pair Audios, 2 Displays
Comment
-
I like Triggers being WHEN. It clearly differentiates the Triggers from the Conditions. I also like the color differentiation among elements with the tags in grey. I do not see the need to outline the blocks, it just makes it busier. There are plenty of visual clues to make the flow of the Event clear in the sample.
I agree that it would be useful to have multiple Actions in each Conditional Action block.
Else would only work on conditions, it wouldn't for triggers. It could be useful for conditions and should be reasonably easy to implement within this new structure.
This:
WHEN It is 8:00PM
THEN
IF The house is occupied
Set the living room track lights to 50%
THEN
IF The house is not occupied
Set the living room track lights to 60%
Becomes:
WHEN It is 8:00PM
THEN
IF The house is occupied
Set the living room track lights to 50%
ELSE
Set the living room track lights to 60%HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon
- Likes 4
Comment
-
Originally posted by ksum View PostI like the WHEN and additional color coding. That was posted while I was making my last response. I also like the THEN breaks.
My comment regarding the Evaluation of Devices in each Conditional Block is still apparently open, though, and I think not understood in my first posting of such. In the example from macromark, if an earlier block in this same event opened the Outside Garage Door there becomes 2 possibilities for the last Condition:- The Garage Door was closed before the Event starts and is evaluated as Closed
- The Garage Door has since been Opened and therefore evaluates as Open
Comment
-
Originally posted by ksum View PostRegarding the ELSE request
I can see this as being problematic:IF the Time Is X (Will run at that time only)Do SomethingELSEDo Something Else
This is only one example of the many instances where Else causes problems. It seems the use of a second Event is more straightforward for Else uses which are actually opposite triggers.
However, for the new conditions (which we are discussing here) it makes perfect sense. I have multiple examples of complicated conditions, and then a second event (with the same trigger) testing the exact opposite condition. Using an ELSE would make it soo much simpler and easier to implement and read.stefxx
Comment
-
Originally posted by randy View PostI like Triggers being WHEN. It clearly differentiates the Triggers from the Conditions. I also like the color differentiation among elements with the tags in grey. I do not see the need to outline the blocks, it just makes it busier. There are plenty of visual clues to make the flow of the Event clear in the sample.
I agree that it would be useful to have multiple Actions in each Conditional Action block.
Else would only work on conditions, it wouldn't for triggers. It could be useful for conditions and should be reasonably easy to implement within this new structure.
This:
WHEN It is 8:00PM
THEN
IF The house is occupied
Set the living room track lights to 50%
THEN
IF The house is not occupied
Set the living room track lights to 60%
Becomes:
WHEN It is 8:00PM
THEN
IF The house is occupied
Set the living room track lights to 50%
ELSE
Set the living room track lights to 60%
- Likes 1
Comment
-
Originally posted by ksum View PostI like the WHEN and additional color coding. That was posted while I was making my last response. I also like the THEN breaks.
My comment regarding the Evaluation of Devices in each Conditional Block is still apparently open, though, and I think not understood in my first posting of such. In the example from macromark, if an earlier block in this same event opened the Outside Garage Door there becomes 2 possibilities for the last Condition:- The Garage Door was closed before the Event starts and is evaluated as Closed
- The Garage Door has since been Opened and therefore evaluates as Open
HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon
- Likes 1
Comment
-
Originally posted by upstatemike View Post
I would think the state of all conditions at the point of the Master Trigger is what would be evaluated, so option 1. If conditions are allowed to alter state mid-event the outcome could be hard to predict and unpleasant to troubleshoot. The order of your "And If" statements would also become super critical.
The conditions are evaluated at the time the Event (or Conditional Action) is called. Ordering of Actions has always been important in Event creation. Perhaps it becomes more important with Conditional Actions, but it’s already’ baked in’ to HS.
Comment
Comment