Notifications Conditional on a Flag

I just finally upgraded (well, actually, re-started from scratch) my Vera 1 to a Vera Lite, and have been re-building all my scenes and notifications in UI5. But I’ve run into a snag that I’m hoping someone can help me with.

In the old FindVera interface, I was able to setup notification events, and then attach LUA code to them so that I could make the notifications conditional on the setting of a virtual device (flag). The specific use case is my vacation home - I don’t want notifications every time my back gate is opened when I’m actually here, but only when I’m away. I cannot find a way in UI5 to make the notification conditional on the status of another device. Any ideas?

I already have my virtual device setup to indicate whether or not my vacation home is occupied. And I use it in LUA code with several scenes to make them conditional. I wanted to be able to do the same thing with my notifications.

Thanks in advance for any assistance.

I have been working on a similar scene. My scene has triggers that send a message when any listed sensor is tripped (armed or not). I wanted to only have this scene send the messages when the luup condition was true:
–Virtual Device ID# = 45
–Status 0 = unoccupied
local OCCDevice = 45
local OCCStatus = luup.variable_get(“urn:upnp-org:serviceId:VSwitch:1”, “Status”, OCCDevice) or “0”
if (OCCStatus == “0”) then
return true
else
return false
end
However, even though my virtual device state is 1, I am still getting messages when any of my sensors trip. Does anyone know if my Lua code is correct?
Thanks