From 85941428b2488b22cff2be336656a7b509bee321 Mon Sep 17 00:00:00 2001 From: Bram Prieshof Date: Sun, 23 Feb 2020 21:04:00 +0000 Subject: [PATCH] 'lua/LUA-SmartPing-SingelDev-UnConfigured.lua' toevoegen --- lua/LUA-SmartPing-SingelDev-UnConfigured.lua | 24 ++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 lua/LUA-SmartPing-SingelDev-UnConfigured.lua diff --git a/lua/LUA-SmartPing-SingelDev-UnConfigured.lua b/lua/LUA-SmartPing-SingelDev-UnConfigured.lua new file mode 100644 index 0000000..3a8be67 --- /dev/null +++ b/lua/LUA-SmartPing-SingelDev-UnConfigured.lua @@ -0,0 +1,24 @@ +commandArray = {} +--@HomeSelector +MainSelector='' + +--Devices +Phone='' + +--GeoZones +GeoNear='' +GeoAway='' + +for deviceName,deviceValue in pairs(devicechanged) do +if (otherdevices[Phone] == 'On') then + if otherdevices[MainSelector] == 'Yes' then else commandArray[MainSelector] = 'Set Level: 30' end +elseif (otherdevices[Phone] == 'Off') and (otherdevices[GeoNear] == 'On') then + if otherdevices[MainSelector] == 'Nearby' then else commandArray[MainSelector] = 'Set Level: 20' end +elseif (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[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