Multiple conditions error

Hello,

I am trying to run a scene with the following conditions: One switch is turned on, and two other switches are turned off. I am using the following code but it is throwing a Lua code error…

Anyone see an issue with the below code?

Thanks !


return checkNest() and checkGreatRoom() and checkKitchen()

function checkNest()
local dID = 4 – Device ID of your Z-Wave Switch
local allow = true – true runs scene if switch is on, false blocks it
local status = luup.variable_get(“urn:upnp-org:serviceId:SwitchPower1”,“Status”,dID)
return ((status == “1”) == allow) --turned On
end

function checkGreatRoom()
local dID = 8 – Device ID of your Z-Wave Switch
local allow = true – true runs scene if switch is on, false blocks it
local status = luup.variable_get(“urn:upnp-org:serviceId:SwitchPower1”,“Status”,dID)
return ((status == “0”) == allow) --turned off
end

function checkKitchen()
local dID = 19 – Device ID of your Z-Wave Switch
local allow = true – true runs scene if switch is on, false blocks it
local status = luup.variable_get(“urn:upnp-org:serviceId:SwitchPower1”,“Status”,dID)
return ((status == “0”) == allow) --turned off
end