I need help to understand why the below described HC2 Scene does not trigger when set to "Automatic" and the Variable "ATest" is set to "True".
I can trigger the Scene manually wherafter the Device "Test" turns off as expected. Below follows the details:
In order to understand the difference between "Automatic" and "Manual" and the effect of having av Scene turned "On" or "Off" in HC2, I made the following very simple test Scene in the Graphic Block editor:
IF Variable "ATest" == "True"
THEN Device "Test" = "Turn Off"
The Variable "ATest" was created in the HC2 Variable Panel as a "Predefined Variable" with to defined values, namely "True" or "False".
local startSource = fibaro:getSourceTrigger();
if (
( fibaro:getGlobalValue("ATest") == "True" )
or
startSource["type"] == "other"
)
then
fibaro:call(182, "turnOff");
end
Any help to explain why the Scene does not turn off the device will be highly appreciated!
Question
jodohl 8
I need help to understand why the below described HC2 Scene does not trigger when set to "Automatic" and the Variable "ATest" is set to "True".
I can trigger the Scene manually wherafter the Device "Test" turns off as expected. Below follows the details:
In order to understand the difference between "Automatic" and "Manual" and the effect of having av Scene turned "On" or "Off" in HC2, I made the following very simple test Scene in the Graphic Block editor:
IF Variable "ATest" == "True"
THEN Device "Test" = "Turn Off"
The Variable "ATest" was created in the HC2 Variable Panel as a "Predefined Variable" with to defined values, namely "True" or "False".
The Device "Test" is a Fibaro Wallplug
In precise LUA code:
--[[
%% properties
%% weather
%% events
%% globals
ATest
--]]
local startSource = fibaro:getSourceTrigger();
if (
( fibaro:getGlobalValue("ATest") == "True" )
or
startSource["type"] == "other"
)
then
fibaro:call(182, "turnOff");
end
Any help to explain why the Scene does not turn off the device will be highly appreciated!
Link to post
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.