Here's an example of a LUA snippet I use to cause a scene to run during "Day" time:
local DayNight_Status = luup.variable_get("urn:rts-services-com:serviceId:DayTime","Status",DayNight_ID)
return (DayNight_Status == "1")
As you can see, it's a bit simpler than yours in that all it does is get the status and then executes a return of the actual status compared to a value of "1" (which represents "Day"). I never had much luck with the double equality things like you're trying to use and this has been solid for me. Also, I don't execute any sort of "return" inside my functions like this without a very specific reason to do so.
As an aside, I have global variables defined at startup to identify a few key devices in my system like the Day/Night Plugin and that's why this code is as short as it is.