Created
January 29, 2020 21:33
-
-
Save chatainsim/ef06c59a808cfbc734d7dd534a71b225 to your computer and use it in GitHub Desktop.
Motion time lua Domoticz
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
time = os.date("*t") | |
TimeToStart = (timeofday['SunsetInMinutes'] - 30) | |
Now=(60 * time.hour + time.min) | |
commandArray = {} | |
if (devicechanged['Sonoff_Bridge_RF'] == '16110926') then | |
if (timeofday['Nighttime']) then | |
commandArray['Ta Lampe']='On FOR 1' | |
else | |
if ((Now >= TimeToStart) and (Now < timeofday['SunriseInMinutes'])) then | |
commandArray['Ta Lampe']='On FOR 1' | |
end | |
end | |
end | |
return commandArray |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment