I have a script made that dim my garden light to 80 % when the door is opened and it is dark outside, works fine. But only the first device is activated.
Code: Select all
return {
active = true,
on = {'Achterdeur'},
execute = function(domoticz, Achterdeur)
if (Achterdeur.state == 'Open' and domoticz.variables['DarkOutside'].value == 'True')
then
domoticz.devices['Tuin Verlichting'].dimTo(80).for_min(2)
domoticz.devices['Lamp Achterdeur'].dimTo(80).for_min(2)
end
end
}