Announcement

Collapse
No announcement yet.

Feedback Request: Conditional Actions

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #91
    Originally posted by macromark View Post

    Yes the action blocks will be executed sequentially. We've never had END blocks so I don't think there's a need to add that now. Folks appear to understand the logic as is.
    I think I was very unclear -- the END was not so much to delineate the end of the block (colors work well) but to exit out of the event itself to stop any further processing.... more of an ABORT/RETURN/EXIT if you will....

    Comment


      #92
      Originally posted by ecetron View Post

      I think I was very unclear -- the END was not so much to delineate the end of the block (colors work well) but to exit out of the event itself to stop any further processing.... more of an ABORT/RETURN/EXIT if you will....
      Can you give me a real world example of where this would be needed?
      💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

      Comment


        #93
        Just to be clear, am I correct that conditions that follow a THEN apply only to actions before the next THEN, but all actions are affected by conditions that appear before the first THEN?
        Mike____________________________________________________________ __________________
        HS3 Pro Edition 3.0.0.548, NUC i3

        HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

        Comment


          #94
          Originally posted by macromark View Post

          Can you give me a real world example of where this would be needed?
          I believe the thought may be such as shown below. I wanted to keep the Run Event action as well but my image editor didn't allow. Apologies for that but I think it gets the idea across. If one condition is met, stop processing further. Of course, for many actions you could make sure orders and conditions are good, but this becomes as helpful as Return statement in the middle of any function. I wonder if it could be handled by multiple events, but know the goal of some is to limit the number of events they have.

          Indenting items under each Then would make reading a little easier, but the THEN sections do work.

          Click image for larger version

Name:	image.png
Views:	206
Size:	118.2 KB
ID:	1574053
          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


            #95
            I assume from this that ELSE is not an option, even within a THEN group, correct?
            Mike____________________________________________________________ __________________
            HS3 Pro Edition 3.0.0.548, NUC i3

            HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

            Comment


              #96
              Originally posted by Uncle Michael View Post
              I assume from this that ELSE is not an option, even within a THEN group, correct?
              ELSE is already a FR. macromark did indicate that ELSE will maybe in a next itteration.

              ---
              John

              Comment


                #97
                Originally posted by Uncle Michael View Post
                I assume from this that ELSE is not an option, even within a THEN group, correct?
                This has been discussed (either earlier in this thread or in the forums), ELSE IF will not be considered at this time. maybe in future updates. Also, given what's being proposed ELSE logic is easily implemented.

                Old way:
                IF a = 1
                THEN do Something
                ELSE do SomethingElse

                New way:
                IF a = 1
                THEN do Something
                IF a <> 1
                THEN do SomethingElse

                In my mind, just getting what MacroMark proposed is a HUGE win and will reduce my Event count considerably.

                Comment


                  #98
                  Originally posted by ecetron View Post

                  I think I was very unclear -- the END was not so much to delineate the end of the block (colors work well) but to exit out of the event itself to stop any further processing.... more of an ABORT/RETURN/EXIT if you will....
                  If this gets implemented, there is hardly any need for an ELSE anymore
                  stefxx

                  Comment


                    #99
                    Originally posted by macromark View Post

                    Can you give me a real world example of where this would be needed?
                    Usually it would be if I was processing through and I got an error -- or I tested a condition and it made no sense to keep going through the rest... and I think Karl, above, gave another clear example...

                    And again -- sorry for the nit-picking but just having this enhancement is HUGE... and greatly appreciated...

                    Comment


                      Originally posted by ksum View Post

                      I believe the thought may be such as shown below. I wanted to keep the Run Event action as well but my image editor didn't allow. Apologies for that but I think it gets the idea across. If one condition is met, stop processing further. Of course, for many actions you could make sure orders and conditions are good, but this becomes as helpful as Return statement in the middle of any function. I wonder if it could be handled by multiple events, but know the goal of some is to limit the number of events they have.

                      Indenting items under each Then would make reading a little easier, but the THEN sections do work.

                      Karl - If I understand what you're saying the END in your example serves as a FULL STOP for the event.. that the next 2 THEN blocks would not execute if the first THEN block does. Am I getting that right?
                      💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                      Comment


                        Originally posted by macromark View Post

                        Karl - If I understand what you're saying the END in your example serves as a FULL STOP for the event.. that the next 2 THEN blocks would not execute if the first THEN block does. Am I getting that right?

                        That is what I had intended -- and I think that matches Karl's interpretation of my original comment...

                        Comment


                          Originally posted by macromark View Post

                          Karl - If I understand what you're saying the END in your example serves as a FULL STOP for the event.. that the next 2 THEN blocks would not execute if the first THEN block does. Am I getting that right?
                          Correct. An End of the processing without doing any further Then statements beyond that point. Just like an End or Exit() statement in some programming languages. Or, if you prefer, the same as the Return statement in most languages stops the execution of a function/subroutine at that point and goes back to the calling statement.
                          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


                            In regard to the "END", a simple way to implement this would be to have a new action like "End Actions". You can then add that as the last action in your condition group to stop action processing. This action would only be available if you were editing a "Then" block with a condition.
                            💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                            Comment


                              Originally posted by rjh View Post
                              In regard to the "END", a simple way to implement this would be to have a new action like "End Actions". You can then add that as the last action in your condition group to stop action processing. This action would only be available if you were editing a "Then" block with a condition.
                              I believe this may work and the conditional availability makes sense.
                              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 Post
                                So, there are number of considerations involved with adding this feature. Certainly, one of the biggest is that we don't want to "break" the event engine for those who have no interest in using this feature and simply want to continue to use it as they always have. For those folks, the essential format will remain the same. These are the proposed changes:

                                The trigger group up top will be untouched except for the following changes.
                                • Master trigger dividers will be changed from IF and OR IF to WHEN and OR WHEN
                                • Row colors and/or dividers will be changed to this: Red-hued colors will be used for triggers and trigger dividers, existing blue-hued condition rows will now have blue-hued divider blocks (AND IF).
                                The action group will have these changes.
                                • THEN dividers will be colored green and will extend the length of the row. These dividers will signal the beginning of ACTION GROUPS. If conditions are not added to any actions, there will only be 1 action group (as there currently is)
                                • Clicking the [+] button as the end of a action group will add another action group
                                • A new "add condition" icon will be added to actions. Clicking this will open the existing screens for creating conditions immediately above that action in the same action block.
                                • As before, it will be possible to edit, move, enable/disable, delete and add more actions to/within a group. It will now be possible to move, enable/disable, delete and add action groups in the same manner.
                                The example below includes 3 action groups. The first group will execute when 2 conditions are met, the second group will always execute when the master trigger fires and the third group will execute when its single condition is met.

                                Click image for larger version Name:	image.png Views:	0 Size:	122.2 KB ID:	1573960
                                I like it!

                                HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

                                Comment

                                Working...
                                X