Après quelques heures de recherche et d'essai je bloque !
Message d'erreur dans le log :
2020-03-01 17:17:04.757 Error: EventSystem: commandArray in script 22 Script éclairage 3*8 should only return ['string']='actionstring' or [integer]={['string']='actionstring'}
Je ne dois pas en être loin mais ça coince à ce niveau :
Code : Tout sélectionner
commandArray = {}
local heure = os.date("%H:%M")
local semaine = tonumber (os.date("%W"))
local num = semaine +1
local horaire = uservariables['Semaine 3*8']
-- retourne le jour actuel en français ex: "mardi"
days = {"dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"}
jour = days[(os.date("%w")+1)]
-- il fait nuit
nightTime = timeofday['Nighttime']
if heure == '00:10' then
if num == 3 or 6 or 9 or 12 or 15 or 18 or 21 or 24 or 27 or 30 or 33 or 36 or 39 or 42 or 45 or 48 or 51 then
commandArray['Variable:Semaine 3*8']=tostring(1)
commandArray['UpdateVariable'] = 5
elseif num == 4 or 7 or 10 or 13 or 16 or 19 or 22 or 25 or 28 or 31 or 34 or 37 or 40 or 43 or 46 or 49 or 52 then
commandArray['Variable:Semaine 3*8']=tostring(2)
commandArray['UpdateVariable'] = 5
elseif num == 2 or 5 or 8 or 11 or 14 or 17 or 20 or 23 or 26 or 29 or 32 or 35 or 38 or 41 or 44 or 47 or 50 or 53 then
commandArray['Variable:Semaine 3*8']=tostring(3)
commandArray['UpdateVariable'] = 5
end
end
return commandArrayif num == 3 or 6 or 9 or 12 or 15 or 18 or 21 or 24 or 27 or 30 or 33 or 36 or 39 or 42 or 45 or 48 or 51 then
Un avis ?
Merci
Bonne fin de journée.
A+
Fab