Skip to content

Instantly share code, notes, and snippets.

@davidou123
Created May 11, 2016 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidou123/ec4060e9df08d3d534a0959e4998abb4 to your computer and use it in GitHub Desktop.
Save davidou123/ec4060e9df08d3d534a0959e4998abb4 to your computer and use it in GitHub Desktop.
--[[
%% autostart
%% properties
%% globals
--]]
fibaro:debug('定時關燈');
while true do
local currentDate = os.date("*t");
fibaro:debug(currentDate.hour==22 and currentDate.min==00);
if (currentDate.hour==22 and currentDate.min==00 ) then
fibaro:call(7, 'turnOn');
fibaro:debug('open!!');
end
fibaro:debug(os.date("%H:%M:%S"));
fibaro:sleep(5000);
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment