Hello,
Je voudrai partager mon code car il ne fonctionne pas. Pouvez vous m'aider?
Le but est defermer mes volets lorsque la température commence à monter.
Le programme fonctionne en manuel mais pas en automatique. C'est comme si la scène n'est jamais déclenché, malgres les variations de 164 et 4.
--[[
%% properties
194 value --Température Chambre parentale
3 Temperature --Température exterrieur Internet
%% events
%% globals
--]]
if(fibaro:countScenes() >1) then
fibaro:abort()
fibaro:debug('Abort')
end
fibaro:debug("Température exterrieur Internet : " ..fibaro:getValue(3, "Temperature"));
fibaro:debug("Température exterrieur Internet : " ..fibaro:getValue(194, "value"));
local startSource = fibaro:getSourceTrigger();
if (startSource["type"] == "other") then fibaro:debug("Commande manuelle") end
if (
(tonumber(fibaro:getValue(3, "Temperature")) >= tonumber(23.5) and
tonumber(fibaro:getValue(194, "value")) >= 23 and
fibaro:getGlobalValue("Etat_Volets") ~= "Fraîcheur")
or
startSource["type"] == "other"
)
then
fibaro:setGlobal("Etat_Volets", "Fraîcheur");
fibaro:startScene(263); -- Démarrage de la scène Ferm.fraî. volets
fibaro:call(8, "sendDefinedEmailNotification", "373");
fibaro:call(133, "sendDefinedPushNotification", "373");
fibaro:call(375, "sendDefinedPushNotification", "373");
fibaro:call(229, "sendDefinedEmailNotification", "373");
fibaro:call(230, "sendDefinedPushNotification", "373");
fibaro:call(251, "sendDefinedPushNotification", "373");
fibaro:debug("Fermeture demandée")
end