Created
February 15, 2019 07:49
-
-
Save yoimbert/ca2ceb81b6abedaf9e0fbb5eb3972c29 to your computer and use it in GitHub Desktop.
Lua Hour Motion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
%% autostart | |
%% properties | |
35 value | |
%% weather | |
%% events | |
%% globals | |
--]] | |
if fibaro:countScenes() > 1 then | |
fibaro:abort() | |
end | |
local now = os.date("%H:%M") | |
if (now >= "07:00" and now <= "23:00") then | |
if ( | |
(tonumber(fibaro:getValue(110, "value")) == 0 and tonumber(fibaro:getValue(35, "value")) > 0 )) | |
then | |
fibaro:call(110, "turnOn"); | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment