Hey guys.
I've been using Indigo since mid 2010. I'm pretty familiar with AppleScript, so I built all kinds of AppleScript into my fairly extensive Indigo/INSTEON setup. I just recently upgraded to Indigo 5 and have begun auditing my AppleScript code to see if there's a way to increase efficiencies by rewriting some of the AppleScript in Python (though I'm not nearly as familiar with Python as I am with AppleScript). I never liked the "dot-object" OO programming syntax much, so I'm having to adjust to the less readable code.
In any case, I'm using the new NOAA Weather plugin and have created a "Weather" device. I'm using it to determine sprinkler watering time behavior by 1) determining if there was precipitation each day, and 2) updating the "sprinklerDurationMultiplier" variable based on the highest temperature in the day. When converting all my "variable changed" triggers to "device changed" triggers, I noticed that 1) there doesn't seem to be a way to access plugin device parameters via AppleScript and 2) it's only possible to use AppleScript in the "If script returns true" entry field of the Condition tab in a trigger. The tests that I'm performing are multiple string matches against the "currentCondition" state (e.g if indigo.devices['Weather'].states['currentCondition'].find('Rain') > 0 or indigo.devices['Weather'].states['currentCondition'].find('Showers') > 0) in the NOAA Weather device. When clicking the "Compile and Test" button, Indigo returns an AppleScript error "Expected 'then' but found unknown token." I thought about using the multiple condition matching rules, but the only matching options available for the Current Condition status are "is equal to" and "is not equal to".
Would it be possible to 1) add a "contains" and "does not contain" option for device statuses that are textual values and/or 2) have selectable script types for the "If script returns true" field in the Conditions tab?