[Résolu] Petit script ne fonctionne plus après ma maj 2023.2
Publié : 23 juil. 2023, 14:12
Bonjour,
J'ai un petit script très simple qui ne fonctionne plus après la maj 2023.2.
Quelqu'un peut-il me dire pourquoi.
Ce script passe la consigne de mes vannes thermostatiques à 15 °C lorsqu'elles reçoivent une autre consigne.
Cela permet de ne pas les faire manœuvrer et donc consommer lorsque le chauffage est éteint en été.
Le message d'erreur est:
2023-07-23 14:10:25.476 Error: EventSystem: in Consigne été: [string "local Temperature_SP = 'Bureau'..."]:21: attempt to compare number with nil
Je ne comprends pas pourquoi la valeur est nulle.
Merci pour votre aide.
Georges
J'ai un petit script très simple qui ne fonctionne plus après la maj 2023.2.
Quelqu'un peut-il me dire pourquoi.
Ce script passe la consigne de mes vannes thermostatiques à 15 °C lorsqu'elles reçoivent une autre consigne.
Cela permet de ne pas les faire manœuvrer et donc consommer lorsque le chauffage est éteint en été.
Code : Tout sélectionner
local Temperature_SP = 'Bureau'
local Temperature_SP1 = 'Salon télé'
local Temperature_SP2 = 'Salon'
local Temperature_SP3 = 'SDB bas'
local Temperature_SP4 = 'Chambre Emma'
local Temperature_SP5 = 'SDB haut'
local Temperature_SP6 = 'Chambre parents'
commandArray = {}
local iThermostatSetPoint = tonumber( otherdevices_svalues[Temperature_SP] )
local iThermostatSetPoint1 = tonumber( otherdevices_svalues[Temperature_SP1] )
local iThermostatSetPoint2 = tonumber( otherdevices_svalues[Temperature_SP2] )
local iThermostatSetPoint3 = tonumber( otherdevices_svalues[Temperature_SP3] )
local iThermostatSetPoint4 = tonumber( otherdevices_svalues[Temperature_SP4] )
local iThermostatSetPoint5 = tonumber( otherdevices_svalues[Temperature_SP5] )
local iThermostatSetPoint6 = tonumber( otherdevices_svalues[Temperature_SP6] )
if (otherdevices['Consigne thermostats été']=='On' and iThermostatSetPoint > 15) then
commandArray={['UpdateDevice']='268|0|15'}
end
if (otherdevices['Consigne thermostats été']=='On' and iThermostatSetPoint1 > 15) then
commandArray={['UpdateDevice']='258|0|15'}
end
if (otherdevices['Consigne thermostats été']=='On' and iThermostatSetPoint2 > 15) then
commandArray={['UpdateDevice']='264|0|15'}
end
if (otherdevices['Consigne thermostats été']=='On' and iThermostatSetPoint3 > 15) then
commandArray={['UpdateDevice']='256|0|15'}
end
if (otherdevices['Consigne thermostats été']=='On' and iThermostatSetPoint4 > 15) then
commandArray={['UpdateDevice']='266|0|15'}
end
if (otherdevices['Consigne thermostats été']=='On' and iThermostatSetPoint5 > 15) then
commandArray={['UpdateDevice']='260|0|15'}
end
if (otherdevices['Consigne thermostats été']=='On' and iThermostatSetPoint6 > 15) then
commandArray={['UpdateDevice']='262|0|15'}
end
return commandArray2023-07-23 14:10:25.476 Error: EventSystem: in Consigne été: [string "local Temperature_SP = 'Bureau'..."]:21: attempt to compare number with nil
Je ne comprends pas pourquoi la valeur est nulle.
Merci pour votre aide.
Georges