[2022.1] erreur sur scripts lua
Publié : 10 mars 2022, 14:55
Bonjour à tous
Suite à mon passage vers 2022.1 certains scripts lua me revoinet des erreurs dans les logs.
2022-03-10 08:44:27.814 Error: EventSystem: in CO2 - Device: [string " ..."]:16: attempt to compare number with nil
L'erreur vient sur la dernière ligne
Le script est de type device, si je le change en time j'ai une autre erreur.
2022-03-10 14:43:00.139 Error: EventSystem: in CO2 - Device: [string "..."]:11: attempt to index a nil value (global 'devicechanged')
L'un de vous connait ce genre de comportement ?
Merci
Suite à mon passage vers 2022.1 certains scripts lua me revoinet des erreurs dans les logs.
2022-03-10 08:44:27.814 Error: EventSystem: in CO2 - Device: [string " ..."]:16: attempt to compare number with nil
L'erreur vient sur la dernière ligne
Code : Tout sélectionner
function verif_niveau_co2(nom_chambre,variable_email,adresse_email)
if (devicechanged[nom_chambre]) then
time = os.date("*t")
-- print ('Valeur CO2 '..nom_chambre..' : '..otherdevices[nom_chambre])
nb_email = uservariables[variable_email]
if (tonumber(otherdevices[nom_chambre]) > 1200 and time.hour >= 9 and time.hour <=23 ) then
2022-03-10 14:43:00.139 Error: EventSystem: in CO2 - Device: [string "..."]:11: attempt to index a nil value (global 'devicechanged')
L'un de vous connait ce genre de comportement ?
Merci