Hi all,
This is probably really simple, but so much so it's got me puzzling at the mo...
I have a Homeseer device which is a device variable...
This variable can be set to values of either 0, 1 or 2 depending on certain conditions...
I have no problem using it as a trigger when it changes to a specified value...
But, there is a circumstance when I need to know what it was *before* it changed... for instance, when the value becomes 0, I need to know which of the following is true:
value changed from 1 to 0
value changed from 2 to 0
Each of the two possible conditions requires different actions.
Initially I tried using the "becomes not equal to" condition, but this doesn't work right since it triggers on too many conditions - e.g. if I use "value becomes not equal to 2" it triggers when:
value changed from 2 to 0 (correct, - as I want)
value changed from 1 to 0 (not what I want!)
value changed from 0 to 1 (also not what I want!)
Logically speaking the 2nd two conditions are "correct" triggers I guess, but aren't what I want. I want to only trigger on the first condition, i.e. when the value stops being equal to 2.... and at the moment, I can't seem to find a combination of triggers and conditions that will do this...
I'm now wondering if I will have to use a global variable to track the device variable value and check against that to see what it changed FROM....
Can anyone enlighten me?
TIA
Paul G.
This is probably really simple, but so much so it's got me puzzling at the mo...
I have a Homeseer device which is a device variable...
This variable can be set to values of either 0, 1 or 2 depending on certain conditions...
I have no problem using it as a trigger when it changes to a specified value...
But, there is a circumstance when I need to know what it was *before* it changed... for instance, when the value becomes 0, I need to know which of the following is true:
value changed from 1 to 0
value changed from 2 to 0
Each of the two possible conditions requires different actions.
Initially I tried using the "becomes not equal to" condition, but this doesn't work right since it triggers on too many conditions - e.g. if I use "value becomes not equal to 2" it triggers when:
value changed from 2 to 0 (correct, - as I want)
value changed from 1 to 0 (not what I want!)
value changed from 0 to 1 (also not what I want!)
Logically speaking the 2nd two conditions are "correct" triggers I guess, but aren't what I want. I want to only trigger on the first condition, i.e. when the value stops being equal to 2.... and at the moment, I can't seem to find a combination of triggers and conditions that will do this...
I'm now wondering if I will have to use a global variable to track the device variable value and check against that to see what it changed FROM....
Can anyone enlighten me?
TIA
Paul G.
Comment