Re: Problème script LUA chauffage
Publié : 28 déc. 2018, 22:30
voici le code
ps j'ai modifié mon rad Chloé en rad Chloe si c'était l'accent qui genait mais a priori c'est pas ça...
le problème se situe sur la ligne 20
commandArray['rad Chloe’]='Set Level 25'
commandArray['rad CH1’]='Set Level 25'
en fait j'ai le pb à priori sur toutes les lignes ou il y a rad Chloe et rad CH1...
ps j'ai modifié mon rad Chloé en rad Chloe si c'était l'accent qui genait mais a priori c'est pas ça...
le problème se situe sur la ligne 20
commandArray['rad Chloe’]='Set Level 25'
commandArray['rad CH1’]='Set Level 25'
en fait j'ai le pb à priori sur toutes les lignes ou il y a rad Chloe et rad CH1...
Code : Tout sélectionner
function IsWeekend()
local dayNow = tonumber(os.date("%w"))
local weekend
if (dayNow == 0) or (dayNow == 6) then weekend = true
else weekend = false
end
return weekend
end
commandArray = {}
-- get current time
minutesnow = timenow.min + timenow.hour * 60
-- PROG radIATEURS VACANCES
if(IsWeekend() == false and uservariables["HOLIDAYS"] == "true") then
commandArray['Salon jardin']='Set Level 25'
commandArray['rad salon rue']='Set Level 25'
commandArray['rad Chloe’]='Set Level 25'
commandArray['rad CH1’]='Set Level 25'
commandArray['rad Tristan']='Set Level 25'
End
-- PROG radIATEURS WEEK END
if(IsWeekend() == true and uservariables["HOLIDAYS"] == "false" and timenow.hour == 06 and timenow.min == 30) then
commandArray['Salon jardin']='Set Level 55'
commandArray['rad salon rue']='Set Level 55'
commandArray['rad Chloe’]='Set Level 55'
commandArray['rad CH1’]='Set Level 55'
commandArray['rad Tristan']='Set Level 55'
End
if(IsWeekend() == true and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 10 and timenow.min == 30) then
commandArray['Salon jardin']='Set Level 35'
commandArray['rad salon rue']='Set Level 35'
commandArray['rad Chloe’]='Set Level 35'
commandArray['rad CH1’]='Set Level 25'
commandArray['rad Tristan']='Set Level 35'
End
if(IsWeekend() == true and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 12 and timenow.min == 30) then
commandArray['Salon jardin']='Set Level 55'
commandArray['rad salon rue']='Set Level 55'
commandArray['rad Chloe’]='Set Level 55'
commandArray['rad CH1’]='Set Level 25'
commandArray['rad Tristan']='Set Level 35'
End
if(IsWeekend() == true and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 14 and timenow.min == 30) then
commandArray['Salon jardin']='Set Level 35'
commandArray['rad salon rue']='Set Level 35'
commandArray['rad Chloe’]='Set Level 25'
commandArray['rad CH1’]='Set Level 25'
commandArray['rad Tristan']='Set Level 35'
End
if(IsWeekend() == true and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 17 and timenow.min == 30) then
commandArray['Salon jardin']='Set Level 55'
commandArray['rad salon rue']='Set Level 55'
commandArray['rad Chloe’]='Set Level 25'
commandArray['rad CH1’]='Set Level 25'
commandArray['rad Tristan']='Set Level 35'
End
if(IsWeekend() == true and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 19 and timenow.min == 30) then
commandArray['Salon jardin']='Set Level 55'
commandArray['rad salon rue']='Set Level 55'
commandArray['rad Chloe’]='Set Level 55'
commandArray['rad CH1’]='Set Level 55'
commandArray['rad Tristan']='Set Level 55'
End
if(IsWeekend() == true and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 22 and timenow.min == 30) then
commandArray['Salon jardin']='Set Level 25'
commandArray['rad salon rue']='Set Level 25'
commandArray['rad Chloe’]='Set Level 25'
commandArray['rad CH1’]='Set Level 25'
commandArray['rad Tristan']='Set Level 25'
End
if(IsWeekend() == true and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 02 and timenow.min == 30) then
commandArray['Salon jardin']='Set Level 25'
commandArray['rad salon rue']='Set Level 25'
commandArray['rad Chloe’]='Set Level 55'
commandArray['rad CH1’]='Set Level 55'
commandArray['rad Tristan']='Set Level 55'
End
if(IsWeekend() == true and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 04 and timenow.min == 30) then
commandArray['Salon jardin']='Set Level 25'
commandArray['rad salon rue']='Set Level 25'
commandArray['rad Chloe’]='Set Level 25'
commandArray['rad CH1’]='Set Level 25'
commandArray['rad Tristan']='Set Level 25'
End
-- PROG radIATEURS SEMAINE
if(IsWeekend() == false and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 05 and timenow.min == 30) then
commandArray['Salon jardin']='Set Level 55'
commandArray['rad salon rue']='Set Level 55'
commandArray['rad Chloe’]='Set Level 55'
commandArray['rad CH1’]='Set Level 55'
commandArray['rad Tristan']='Set Level 55'
End
if(IsWeekend() == false and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 06 and timenow.min == 30) then
commandArray['rad CH1’]='Set Level 25'
End
if(IsWeekend() == false and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 07 and timenow.min == 15) then
commandArray['Salon jardin']='Set Level 25'
commandArray['rad salon rue']='Set Level 25'
commandArray['rad Chloe’]='Set Level 25'
commandArray['rad Tristan']='Set Level 25'
End
if(IsWeekend() == false and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 17 and timenow.min == 30) then
commandArray['Salon jardin']='Set Level 55'
commandArray['rad salon rue']='Set Level 55'
commandArray['rad Chloe’]='Set Level 55'
commandArray['rad CH1’]='Set Level 55'
commandArray['rad Tristan']='Set Level 55'
End
if(IsWeekend() == false and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 21 and timenow.min == 30) then
commandArray['rad Chloe’]='Set Level 25'
commandArray['rad Tristan']='Set Level 25'
End
if(IsWeekend() == false and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 22 and timenow.min == 30) then
commandArray['Salon jardin']='Set Level 25'
commandArray['rad salon rue']='Set Level 25'
End
if(IsWeekend() == false and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 23 and timenow.min == 00) then
commandArray['rad CH1’]='Set Level 25'
End
if(IsWeekend() == false and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 02 and timenow.min == 30) then
commandArray['rad Chloe’]='Set Level 55'
commandArray['rad CH1’]='Set Level 55'
commandArray['rad Tristan']='Set Level 55'
End
iif(IsWeekend() == false and (uservariables["HOLIDAYS"] == "false" and timenow.hour == 04 and timenow.min == 00) then
commandArray['rad Chloe’]='Set Level 25'
commandArray['rad CH1’]='Set Level 25'
commandArray['rad Tristan']='Set Level 25'
End
return commandArray