Short question...
In my house optimalisation system are 2 uservariables verry important: scene selector and Automatic or Manual mode.
When automatic mode is selected then my motion sensor or timmer event changes the scene.
But when i manualy change a device (for example livingroom dimmer) then i want to tur off automatic mode.
this works fine when i use this script:
Code: Select all
return {
active = true,
on = {
devices = {'hue_group_keuken'}
},
execute = function(domoticz, switch)
local hue_group_keuken = domoticz.devices('hue_group_keuken')
local modus_switch = domoticz.devices('automatic_mode_woonkamer_keuken')
local woonkamer_keuken_control = domoticz.variables('woonkamer_keuken_control')
if (woonkamer_keuken_control.value == ('Thuis') and hue_group_keuken.changed()) then
modus_switch.switchOff()
end
end
}
But i think you can gues that when my timer script is changing my hue_group_keuken lights, this script olso dectect the change and switch automatic mode off, how can i prevent this? and only make this script executing when i change manualy the hue_group_keuken lights?
thnx! in advanced.
(sorry for my bad englisch..)