The Vera Community forums have moved!

Advanced => Programming => Scene Scripting => Topic started by: invenire1 on August 17, 2018, 01:56:37 am

Title: PLEG trigger vs non-trigger
Post by: invenire1 on August 17, 2018, 01:56:37 am

I have a multistring with Variable1.
Now I want to use it in PLEG like the following in UI7:

if (luup.variable_get("urn:upnp-org:serviceId:VContainer1", "Variable1", 40) == "foo")
return true
else
return false
end


Meaning: I don't want to have it evaluated each time it changes (working as a trigger), but just after another trigger as an extra filter.

But how do I do this in PLEG?
Under "conditions (automation logic)" in the box I'm only able to specify expressions like
tWaterEnablerOn and (p1 eq "foo")
With p1 referring to a "logic input" and being a trigger.
I cannot specify
tWaterEnablerOn and (luup.variable_get("urn:upnp-org:serviceId:VContainer1", "Variable1", 40) == "foo")