Code: Select all
return {
active = true,
on = {
devices = {
'hall sensor'
}
},
logging = {
level = domoticz.LOG_ERROR
},
execute = function(domoticz, device)
local Light = domoticz.devices('hall 1', 'hall 2', 'hall 3')
local t = domoticz.time
if (device.state == 'On') then
if (Light.state == 'Off') then
if (t.matchesRule('at 19:00-08:00')) then
Light.dimTo(100)
domoticz.log('step in the hall - Свет 100%')
end
end
else
if (Light.state ~= 'Off') then
Light.switchOff()
end
end
end
}