i think i found solution, its so simple that i can believe it took me so long time
Code: Select all
return {
on = {
timer = {'between 12:00 and 22:00'}
},
execute = function(domoticz)
LED_Sunny_On = domoticz.variables('Sunny_ON').value
LED_Sunny_Off = domoticz.variables('Sunny_OFF').value
Time = domoticz.time.rawTime
if Time > LED_Sunny_On and Time < LED_Sunny_Off then
domoticz.log('SUNNY_ON')
domoticz.devices('Akwarium ogólne - LED Sunny').switchOn().checkFirst()
else
domoticz.log('SUNNY_OFF')
domoticz.devices('Akwarium ogólne - LED Sunny').switchOff().checkFirst()
end
Its works fine,
read time ON/OFF from user variable Sunny_ON and Sunny_OFF, and set switch on between this times, in the rest time switch is off.
now i can setting this time w/o editing script \o/