I do not have much experience with dzvents, but i want to learn it.
I have a dusk sensor, and when it switches to "on" i need to switch on some light in our room.
(depending on the state of another light and between a time limit)
Any help would be appreciated!
Code: Select all
return {
on = {
devices = {
'Schemerschakelaar1',
'Staande_lamp'
}
},
execute = function(domoticz,devices)
if Schemerschakelaar1.state == 'On' and
Staande_lamp.state == 'Off' and
(domoticz.time =='Between 11:30 and 22:20')
then
domoticz.devices('Staande_lamp').switchOn()
domoticz.devices('Dressoir').switchOn()
domoticz.log('Device ' .. device.name .. ' was changed', domoticz.LOG_INFO)
end
end
}