'lua/LUA-SmartPing-SingelDev_ON-OFF-UnConfigured.lua' toevoegen
This commit is contained in:
16
lua/LUA-SmartPing-SingelDev_ON-OFF-UnConfigured.lua
Normal file
16
lua/LUA-SmartPing-SingelDev_ON-OFF-UnConfigured.lua
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
commandArray = {}
|
||||||
|
--@HomeSelector
|
||||||
|
MainSelector='<Switch-PresenceSelector>'
|
||||||
|
|
||||||
|
--Devices
|
||||||
|
Phone='<Switch-PhonePresence>'
|
||||||
|
|
||||||
|
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') then
|
||||||
|
if otherdevices[MainSelector] == 'No' then else commandArray[MainSelector] = 'Set Level: 0' end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return commandArray
|
||||||
Reference in New Issue
Block a user