If false updates to false....

This forum is for questions about triggers and the events that can cause them to fire.
hensed
Posts: 67
Joined: Wed Feb 01, 2012 4:48 pm
Location: Oakland, CA

If false updates to false....

Post by hensed »

Dumb question; if an indigo variable with the current value of false, gets an update to the value, also false, would that update fire a trigger that is set to initiate on a change to the variable value? (I may be answering my own question)
Last edited by hensed on Fri Jun 07, 2024 1:23 pm, edited 1 time in total.
User avatar
DaveL17
Posts: 6839
Joined: Tue Aug 20, 2013 11:02 am
Location: Chicago, IL, USA
Contact:

Re: If false updates to false....

Post by DaveL17 »

I don't think there's a way to do it directly. I created a trigger to write a note to the Indigo log when the value of a variable changes. The trigger fires when the variable is changed from True to False. It does not fire when the value "changes" from false to false. Under the hood, variables don't have a Last Update value like devices do:

Code: Select all

description : 
folderId : 1863978771
globalProps : MetaProps : (dict)
     com.indigodomo.indigoserver : (dict)
     emptyDict : (dict)
id : 1289138982
name : Foo03
pluginProps : emptyDict : (dict)
readOnly : False
remoteDisplay : True
sharedProps : com.indigodomo.indigoserver : (dict)
value : false
A hackish way to do it would be to set the variable to an empty string (or some nonsensee value) before "updating" it to false. Then, you could trigger on the event where the variable becomes false. You would need to make sure that your automation doesn't react when the value is changed briefly to something other than true or false. That's the only way I can think of to do it.
I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]
hensed
Posts: 67
Joined: Wed Feb 01, 2012 4:48 pm
Location: Oakland, CA

Re: If false updates to false....

Post by hensed »

LOL - you read my mind, that was exactly what I was thinking of doing if I wasn't able to get this to work. Thank you for your answer, going to try that next step and see if that works.
User avatar
DaveL17
Posts: 6839
Joined: Tue Aug 20, 2013 11:02 am
Location: Chicago, IL, USA
Contact:

Re: If false updates to false....

Post by DaveL17 »

Good luck!
I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]
User avatar
durosity
Posts: 4381
Joined: Thu May 10, 2012 3:21 pm
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: If false updates to false....

Post by durosity »

It would be really nice if the variables list had a last updated column, like devices do, hint hint @matt @jay ;)


Sent from my iPhone using Tapatalk Pro
Computer says no.
User avatar
DaveL17
Posts: 6839
Joined: Tue Aug 20, 2013 11:02 am
Location: Chicago, IL, USA
Contact:

Re: If false updates to false....

Post by DaveL17 »

durosity wrote:It would be really nice if the variables list had a last updated column, like devices do, hint hint @matt @jay ;)
I believe that feature request is on the list.
I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]
User avatar
durosity
Posts: 4381
Joined: Thu May 10, 2012 3:21 pm
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: If false updates to false....

Post by durosity »

DaveL17 wrote:
durosity wrote:It would be really nice if the variables list had a last updated column, like devices do, hint hint @matt @jay ;)
I believe that feature request is on the list.
I believe so too.. along with many others! We need to somehow find a way to clone Matt & Jay. Oooh.. or virtualise them and just spin up a few extra VMs! Now there’s a plot for a black mirror episode..


Sent from my iPhone using Tapatalk Pro
Computer says no.
User avatar
jay (support)
Site Admin
Posts: 18339
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: If false updates to false....

Post by jay (support) »

It is. It is also surprisingly pervasive in that it touches a ton of code that has been solid for many many years. So it makes us really hesitant to add it.
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
User avatar
durosity
Posts: 4381
Joined: Thu May 10, 2012 3:21 pm
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: If false updates to false....

Post by durosity »

jay (support) wrote:It is. It is also surprisingly pervasive in that it touches a ton of code that has been solid for many many years. So it makes us really hesitant to add it.
That’s a totally fair reason not to add it. Stability is by far the most important aspect of a HA system IMHO.


Sent from my iPhone using Tapatalk Pro
Computer says no.
Post Reply

Return to “Triggers and Triggering Events”