'lua/LUA-SmartPing-SingelDev-UnConfigured.lua' toevoegen
This commit is contained in:
24
lua/LUA-SmartPing-SingelDev-UnConfigured.lua
Normal file
24
lua/LUA-SmartPing-SingelDev-UnConfigured.lua
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
commandArray = {}
|
||||||
|
--@HomeSelector
|
||||||
|
MainSelector='<Switch-PresenceSelector>'
|
||||||
|
|
||||||
|
--Devices
|
||||||
|
Phone='<Switch-PhonePresence>'
|
||||||
|
|
||||||
|
--GeoZones
|
||||||
|
GeoNear='<Switch-GeoZoneNear>'
|
||||||
|
GeoAway='<Switch-GeoZoneAway>'
|
||||||
|
|
||||||
|
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
|
||||||
Reference in New Issue
Block a user