Enhancement Request? - Trigger Condition Rule >= & <=

Posted on
Mon Sep 16, 2013 8:46 am
autolog online
Posts: 3991
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Enhancement Request? - Trigger Condition Rule >= & <=

I am setting up a trigger where I want to compare two values for being less than or not less than (i.e. greater or equal to) - I was hoping to achieve this with two triggers but note that the condition not less than (i.e. greater or equal to) doesn't exist.
The only way I have been able to achieve this is to set up three separate triggers - one for less than, one for greater than and one for equal. Is it possible to add in the condition "Not less than" and "Not greater than". So not a show stopper but it would stop a proliferation of triggers which don't really add to the readability - I am processing 13 separate radiators so it means 13 additional triggers. :)

Posted on
Mon Sep 16, 2013 9:26 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Enhancement Request? - Trigger Condition Rule >= & <=

I'm not following - can you give me specifics for what you're trying to do? "Greater than or equal to" can be done by decrementing the value you're looking for. So, if you're looking for "greater than or equal to 10", then you could specify it as "greater than 9". So without knowing the specific details of what you're doing I can't really envision why that won't work.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Sep 16, 2013 10:23 am
autolog online
Posts: 3991
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Enhancement Request? - Trigger Condition Rule >= & <=

jay (support) wrote:
I'm not following - can you give me specifics for what you're trying to do? "Greater than or equal to" can be done by decrementing the value you're looking for. So, if you're looking for "greater than or equal to 10", then you could specify it as "greater than 9". So without knowing the specific details of what you're doing I can't really envision why that won't work.

I am comparing two indigo variables HeatSetPoint & MeasuredTemperature which have been set by two other trigggers as I didn't think I could compare two device states. I just noticed your reply to my other thread which I need to study in detail - it may make this specific requirement obsolete but it is relevant for those cases where you might want to compare two variables as opposed to comparing against a specific value :)

Posted on
Mon Sep 16, 2013 11:42 am
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: Enhancement Request? - Trigger Condition Rule >= & <=

you can do it in conditions

trigger:
1. variable x changed
2. condition: if variable x is >= ... variable y


Karl

Posted on
Mon Sep 16, 2013 11:56 am
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Enhancement Request? - Trigger Condition Rule >= & <=

There are 2 ways to do this in the built-in conditions editor.

  1. Use "None" with the "greater than" condition.
    not greater than.png
    not greater than.png (82.53 KiB) Viewed 2769 times
  2. Use "Any" with the "less than" and "equal to" conditions.
    less than or equal to.png
    less than or equal to.png (87.42 KiB) Viewed 2769 times

Posted on
Mon Sep 16, 2013 12:29 pm
autolog online
Posts: 3991
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Enhancement Request? - Trigger Condition Rule >= & <=

Thanks for the replies :D

My actual conditions are:
Code: Select all
ALL
if variable R01_MeasuredTemp is greater than variable R01_HeatSetpoint
if variable R01_CallingForHeat is true


So on the basis of using NONE, it would be:
Code: Select all
NONE
if variable R01_MeasuredTemp is less than variable R01_HeatSetpoint
if variable R01_CallingForHeat is false


So I would have to flip both comparisons, I think.

So while this will work, I still think that having the suggested comparison operators would make it more understandable.
I think this may get superceded by the discussion on scripting code in another thread :wink:

I really appreciate all the feedback, thanks a lot :D

Posted on
Mon Sep 16, 2013 3:40 pm
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Enhancement Request? - Trigger Condition Rule >= & <=

Within the UI, you could still use the "Any" with "less than" and "equal to" option along with the boolean test for "true".
less than or equal to and boolean.png
less than or equal to and boolean.png (95.26 KiB) Viewed 2718 times

You can create condition groups within the condition editor by holding down the Option key on the keyboard and clicking on the + button (which changes to an ellipses when the Option key is held down). Also, conditions and condition groups can be drug up and down in the list to re-position the conditions.

Posted on
Mon Sep 16, 2013 3:56 pm
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Enhancement Request? - Trigger Condition Rule >= & <=

Yep, Nathan's example would definitely work.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Sep 16, 2013 3:58 pm
autolog online
Posts: 3991
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Enhancement Request? - Trigger Condition Rule >= & <=

nsheldon wrote:
... You can create condition groups within the condition editor by holding down the Option key on the keyboard and clicking on the + button (which changes to an ellipses when the Option key is held down). Also, conditions and condition groups can be drug up and down in the list to re-position the conditions.

I didn't realise it could do that :oops:
I think that addresses the issue and can make things a lot tidier.

Thank you for taking the time to show me how it works. It's very much appreciated :D

Posted on
Mon Sep 16, 2013 4:02 pm
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Enhancement Request? - Trigger Condition Rule >= & <=

Glad to help!

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 10 guests