Skip to content

Instantly share code, notes, and snippets.

@yoimbert
Created February 15, 2019 07:49
Show Gist options
  • Save yoimbert/ca2ceb81b6abedaf9e0fbb5eb3972c29 to your computer and use it in GitHub Desktop.
Save yoimbert/ca2ceb81b6abedaf9e0fbb5eb3972c29 to your computer and use it in GitHub Desktop.
Lua Hour Motion
--[[
%% 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