Re: aide pour réalisation script en lua
Publié : 10 mai 2020, 20:42
le store s'ouvre bien via les commandes direct, les variables se mettent bien a jour
Le nom Nuit est bon copié/collé
Le nom Nuit est bon copié/collé
Reprenez le contrôle de votre domotique
https://easydomoticz.com/forum/
Code : Tout sélectionner
ommandArray={}
-- Fermeture du Store Terrasse
if (otherdevices['Nuit']=='On') then
commandArray['Store Terrasse']='Off'
end
return commandArrayCode : Tout sélectionner
commandArray={}
-- Fermeture du Store Terrasse
if (otherdevices['Nuit']=='On' and uservariables["store exterieur"] == 'ouvert') then
commandArray['Store Terrasse']='Off'
end
return commandArrayCode : Tout sélectionner
commandArray={}
-- Fermeture du Store Terrasse
if (otherdevices['Nuit']=='On' and uservariables["store exterieur"] == 'ouvert') then
commandArray['Store Terrasse']='Off'
end
return commandArrayCode : Tout sélectionner
commandArray={}
print('otherdevices[\'Store Terrasse\'] '..otherdevices['Store Terrasse'])
--pour connaitre les valeurs on met des print. Tu les commentes avec -- quand tu n'en as plus besoin.
-- print('otherdevices[\'UV\'] '..otherdevices['UV'])
--print('otherdevices[\'Pluie\'] '..otherdevices['Pluie'])
-- print('otherdevices[\'Nuit\'] '..otherdevices['Nuit'])
-- print('otherdevices[\'Vent\'] '..otherdevices['Vent'])
-- print('otherdevices[\'Absence\'] '..otherdevices['Absence'])
print('otherdevices[\'Store Terrasse\'] '..otherdevices['Store Terrasse'])
print('otherdevices[uservariables["store exterieur"]] '..uservariables["store exterieur"])
-- Ouverture Store Terrasse
if (devicechanged['Store Terrasse']=='On' and uservariables["store exterieur"] == 'ferme' and otherdevices['Absence']=='Off') then
commandArray['Ouverture Store Terrasse']='On'
print('Ouverture Store Terrasse')
commandArray ['Variable:store exterieur']='ouvert'
commandArray['SendNotification']='Store Terrasse#Ouverture Store Terrasse'
-- Fermeture du Store Terrasse
elseif (devicechanged['Store Terrasse']=='Off' and uservariables["store exterieur"] == 'ouvert' and otherdevices['Absence']=='Off') then
commandArray['Fermeture Store Terrasse']='On'
print('Fermeture Store Terrasse')
commandArray ['Variable:store exterieur']='ferme'
commandArray['SendNotification']='Store Terrasse#Fermeture Store Terrasse'
end
return commandArray