Again its me..
Instead of domTo from 1 to 100 i want from 100 to 1.
This is the current script for the morning:
Code: Select all
local Version = '18.01.24'
local SwitchMorning = 64
local SwitchEvening = 59
local MasterBedroom = 7
return {
active = true,
on = {
devices = {SwitchMorning},
},
logging = {marker = 'SCENE MORNING ' .. Version..'..........'},
execute = function(domoticz, device)
local light = domoticz.devices(MasterBedroom)
if (device.active) then
light.dimTo(1)
light.setKelvin(5000)
for i = 2,120 do
light.dimTo(i).afterSec(i)
end
domoticz.devices(SwitchMorning).switchOff()
domoticz.log('---------------------------------------------------------------------', domoticz.LOG_FORCE)
domoticz.log('--------------------==<[ SCENE MORNING IS ON ]>==--------------------', domoticz.LOG_FORCE)
domoticz.log('---------------------------------------------------------------------', domoticz.LOG_FORCE)
os.execute('/home/pi/domoticz/scripts/Peter/speech.sh "The scene morning is activated"&')
end
end
}