dzVents only updating 1 switch/light
Posted: Sunday 22 January 2017 19:40
Perhaps I'm doing something wrong or is this not supposed to happen?
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.
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
}