Some devices are skipped in script
Posted: Thursday 14 January 2021 16:10
Hi, I have small problem with some devices. These are working well with Timers but not with script. For my Blinds I have some script and only 5 of 7 same blinds are working correctly, the rest are not moving at all...
Only the two first one are not working. Similar problem I have on other script, where 15 Blinds are working fine and only 2 not - last two.
Code: Select all
return {
on = {
timer = {'0 minutes before sunrise'}
},
execute = function(domoticz, triggeredItem)
local level = 100
local levelWschod = 100
if (domoticz.devices(422).active) then -- ochrona przed słońcem
levelWschod = 0
level = 30
end
if (domoticz.devices(723).level < level) then --Roleta WC biuro
domoticz.devices(723).dimTo(level) end
if (domoticz.devices(717).level < level) then --Roleta socjalny
domoticz.devices(717).setLevel(level) end
if (domoticz.devices(718).level < level) then --Roleta lewa od górnej biuro
domoticz.devices(718).dimTo(level) end
if (domoticz.devices(719).level < level) then --Roleta prawa od górnej biuro
domoticz.devices(719).dimTo(level) end
if (domoticz.devices(720).level < levelWschod) then --Roleta lewa od bocznej biuro
domoticz.devices(720).dimTo(levelWschod) end
if (domoticz.devices(721).level < levelWschod) then --Roleta prawa od bocznej biuro
domoticz.devices(721).dimTo(levelWschod) end
if (domoticz.devices(722).level < level) then --Roleta okno balkonowe biuro
domoticz.devices(722).dimTo(level) end
end
}
}