diff --git a/lua/LUA-SmartPing-DualDev-UnConfigured.lua b/lua/LUA-SmartPing-DualDev-UnConfigured.lua new file mode 100644 index 0000000..84e436e --- /dev/null +++ b/lua/LUA-SmartPing-DualDev-UnConfigured.lua @@ -0,0 +1,25 @@ +commandArray = {} +--@HomeSelector +MainSelector='' + +--Devices +Phone='' +Watch='-WatchPresence' + +--GeoZones +GeoNear='' +GeoAway='' + +for deviceName,deviceValue in pairs(devicechanged) do +if (otherdevices[Watch] == 'On') or (otherdevices[Phone] == 'On') then + if otherdevices[MainSelector] == 'Yes' then else commandArray[MainSelector] = 'Set Level: 30' end +elseif (otherdevices[Watch] == 'Off') and (otherdevices[Phone] == 'Off') and (otherdevices[GeoNear] == 'On') then + if otherdevices[MainSelector] == 'Nearby' then else commandArray[MainSelector] = 'Set Level: 20' end +elseif (otherdevices[Watch] == 'Off') and (otherdevices[Phone] == 'Off') and (otherdevices[GeoNear] == 'Off') and (otherdevices[GeoAway] == 'On') then + if otherdevices[MainSelector] == 'Away' then else commandArray[MainSelector] = 'Set Level: 10' end +elseif (otherdevices[Watch] == 'Off') and (otherdevices[Phone] == 'Off') and (otherdevices[GeoNear] == 'Off') and (otherdevices[GeoAway] == 'Off') then + if otherdevices[MainSelector] == 'No' then else commandArray[MainSelector] = 'Set Level: 0' end +end +end + +return commandArray \ No newline at end of file