if (currentTime.matchesRule('after sunset') and light.state <> 'Off') then
only works if I turn on/off the bulbs through Domoticz and not by the remote/app, right? Because the bulbs don't send a state change to the box/Domoticz
That's how I do it with my milight bulbs: return { on = { timer = { '20 minutes before sunset', '10 minutes before sunset', 'every minute between sunset and 21:30'} }, execute = function(domoticz, roomSwitch) local Time = require('Time') local currentTime = Time() Stunden = os.date("%H",os.time ...