Announcement

Collapse
No announcement yet.

Master Condition

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Master Condition

    With the addition of conditional processing the events in HS are definitely more powerful and have less repetition.

    If you're working on this area, another suggestion would be a master condition that turns the whole event on or off.

    I have quite a lot of automation which is enabled or disabled by device status (e.g. Manual disables the events, Summer/Winter enable or disable different events), I'd guess this is a common pattern - with the conditional actions I can now put the check in just once, but it would probably be better for performance if that one-time check was at the top.
    Last edited by pseudocode; March 15, 2023, 04:03 PM. Reason: Enable/Disable event is available in Easytrigger

    #2
    You can put a condition following each of your Triggers using a Virtual Device to enable/disable the Event.
    You can use Easy Trigger or an immediate script to disable the Event.
    You can manually disable an Event.

    What would you want in addition?
    HS4 Pro, 4.2.18.3 Windows 10 pro, Supermicro LP Xeon

    Comment


      #3
      I personally use group conditions where the condition is a flag, but then I do need to repeat the event condition "The Group Conditions are all TRUE".

      Comment


        #4
        Originally posted by randy View Post
        You can put a condition following each of your Triggers using a Virtual Device to enable/disable the Event.
        I use a similar method to enable/disable logging for an event.
        I create a virtual device/features that act as flags for logging during an event.
        In the first Then block I use the condition to control dumping device values to the log.

        I can then enable/disable logging for an event while it is running.


        Comment


          #5
          Originally posted by randy View Post
          You can put a condition following each of your Triggers using a Virtual Device to enable/disable the Event.
          You can use Easy Trigger or an immediate script to disable the Event.
          You can manually disable an Event.

          What would you want in addition?
          Yes but then you have to repeat it if you have multiple WHEN clauses or multiple actions, and the WHEN checks are always being processed. It would be more efficient to have one condition that is only checked once to enable/disable the whole event.

          I'm considering the easytrigger option to enable or disable the events, but then you need another event to do it and you need to handle scenarios like the control device changing while HS is down.

          Comment


            #6
            Originally posted by claude View Post
            I personally use group conditions where the condition is a flag, but then I do need to repeat the event condition "The Group Conditions are all TRUE".
            Yes I do this, but I don't want to create extra groups just because one of my group conditions needs to be a little different.

            Comment


              #7
              Originally posted by jhopple View Post

              I use a similar method to enable/disable logging for an event.
              I create a virtual device/features that act as flags for logging during an event.
              In the first Then block I use the condition to control dumping device values to the log.

              I can then enable/disable logging for an event while it is running.

              Yes I also do this, but I see a lot of events triggering but doing nothing due to the action condition. That seems inefficient - events in HS aren't as responsive as I'd like or in some other systems, maybe having one condition being checked before a more complex set of WHEN and action blockers would be better.

              Comment

              Working...
              X