Voilà ce que j'ai tenté de faire, mais rien ne marche forcément !
Code : Tout sélectionner
commandArray = {}
if (otherdevices['Presence'] == "On") then
if (otherdevices['Presence Watch']=='Off') then
if (otherdevices['Presence iPhone']=='Off') then
if ( uservariables["Varriable iPhone"] == "0" ) then
if ( uservariables["Variable Watch"] == "0" ) then
print ("Presence Off")
commandArray['Presence'] = 'Off'
end
end
end
end
end
return commandArray

Merci pour vos avis !