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