Or......

Tips and Techniques for using MLServer's Automation Rules
User avatar
DaveB
Simply Incredible
Simply Incredible
Posts: 3143
Joined: Sun May 30, 2004 10:57 pm
Location: Mays Landing, NJ
Contact:

Or......

Postby DaveB » Sat Jan 03, 2009 12:45 pm

Dave - I know that eventually the Automation Rules module will be updated, but any chance on adding the "OR" function?? It would make the rules much more useful throughout.
Thanks!

Dave Bruner
:shock:

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Postby CinemarDave » Sat Jan 03, 2009 1:29 pm

This is probably done a lot easier in MLScript. Give me an example of what "OR" you'd like to do and I can show an MLScript example.

User avatar
DaveB
Simply Incredible
Simply Incredible
Posts: 3143
Joined: Sun May 30, 2004 10:57 pm
Location: Mays Landing, NJ
Contact:

Postby DaveB » Sat Jan 03, 2009 4:32 pm

OK here is the example;

If Statement

If
{{hai_unit049_level}} OR {{hai_unit050_level}} OR {{hai_unit179_level}}
Changes;

Run Macro Kitchen_Energy

Macro Kitchen_Energy

Macro|
MLMath|Add~Kit_Avg~{{hai_unit049_level}}~{{hai_unit050_level}}~{{hai_unit179_level}}!
MLMath|Divide~Kit_Avg~{{Kit_Avg}}~3


Obviously, this is also where I needed the rounding functionality and the use of the % from the other post.

Actually the If statement at the top almost works, but HAI has a nasty habit of stranding the light level when the unit is turned off when using UPB, SO I actually should nest this If statement into a test for On or Off.

Thanks!!
Thanks!

Dave Bruner
:shock:

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Postby CinemarDave » Sat Jan 03, 2009 9:39 pm

In this case it is easier to have 3 separate automation rules

Whenver {{hai_unit049_level}} changevalue Run Kitchen_Energy

Whenever {{hai_unit050_level}} changes value Run Kitchen_Energy

Whenever {{hai_unit179_level}} change value Run Kitchen_Energy


Return to “Automation Rules”

Who is online

Users browsing this forum: No registered users and 1 guest