|
|
|
Page 1 of 1
|
[ 2 posts ] |
|
How to go back to the last value after an alert....
| Author |
Message |
|
kidney
Joined: Jul 15, 2007 Posts: 89
|
 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?
|
| Wed Jan 02, 2013 5:26 pm |
|
 |
|
berkinet
Joined: Nov 18, 2008 Posts: 1743 Location: Berkeley, CA
|
 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
|
| Wed Jan 02, 2013 6:40 pm |
|
|
|
Page 1 of 1
|
[ 2 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 1 guest |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|