How to go back to the last value after an alert....

Posted on
Wed Jan 02, 2013 5:26 pm
kidney offline
Posts: 240
Joined: Jul 15, 2007

How to go back to the last value after an alert....

Here we have what we call a "Double rate" system for the electricity, meaning that when it reaches -12° celsius we pay triple the price for electricity.

So knowing that I set up a triggers that when we are below that point I have ALL of the light flash 3 times in the house and then they all close.

Now the question is: Is there a way to have the light that were open go back to their state/value that they were before the alarm?

Posted on
Wed Jan 02, 2013 6:40 pm
berkinet offline
User avatar
Posts: 3297
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: How to go back to the last value after an alert....

As far as I can think (which isn't very far... bad new years cold) you can do what you want, but you will need to do some scripting (AppleScript or Python). The logic would go like:

First, create an indigo variable for each light you want to store the value of.

Temp falls below -12C triggering an Indigo Trigger
- You'd probably store the temp in a variable and trigger of that variable becoming < -12

Then, in the script, read the on state or brightness of every light you are interested in and,
save that value in the appropriate variable.

You'd need similar, but reversed, logic to reset everything when the temperature went above -12. You might want to leave yourself a small dead-band to avoid thrashing: like <-12 and >-11.5

EDIT: ACtually, with the Action Collection plugin, you might be able to store the on state values without scripting. But, going the other way would probably stuill require scripting

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 10 guests