I want make a morning wakeup light idea of my bulbs in sealing in bedroom. Have this now but is there a way to make it much easier?
a loop code so i have 1 line and the dimTo() and afterSec() will count from 1 sec to 120 for example. Instead add everyone for every second?
Code: Select all
local Version = '18.01.23'
local FullManualModus = 69
local SwitchDaytime = 60
local SwitchGoodnight = 65
local SwitchMorning = 64
local SwitchSexy = 63
local SwitchMovie = 62
local SwitchTV = 61
local SwitchEvening = 59
local MasterBedroom = 7
return {
active = true,
on = {
devices = {SwitchMorning},
},
logging = {marker = 'SCENE MORNING ' .. Version..'..........'},
execute = function(domoticz, device)
if
domoticz.devices(SwitchMorning).state == 'On'
then
domoticz.devices(MasterBedroom).dimTo(5)
domoticz.devices(MasterBedroom).setKelvin(5000)
domoticz.devices(MasterBedroom).dimTo(6).afterSec(6)
domoticz.devices(MasterBedroom).dimTo(7).afterSec(7)
domoticz.devices(MasterBedroom).dimTo(8).afterSec(8)
domoticz.devices(MasterBedroom).dimTo(9).afterSec(9)
domoticz.devices(MasterBedroom).dimTo(10).afterSec(10)
domoticz.devices(MasterBedroom).dimTo(11).afterSec(11)
domoticz.devices(MasterBedroom).dimTo(12).afterSec(12)
domoticz.devices(MasterBedroom).dimTo(13).afterSec(13)
domoticz.devices(MasterBedroom).dimTo(14).afterSec(14)
domoticz.devices(MasterBedroom).dimTo(15).afterSec(15)
domoticz.devices(MasterBedroom).dimTo(16).afterSec(16)
domoticz.devices(MasterBedroom).dimTo(17).afterSec(17)
domoticz.devices(MasterBedroom).dimTo(18).afterSec(18)
domoticz.devices(MasterBedroom).dimTo(19).afterSec(19)
domoticz.devices(MasterBedroom).dimTo(20).afterSec(20)
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
}