This commit is contained in:
2020-11-25 23:21:43 +01:00
parent a9021604a2
commit f8c1b116a8
4 changed files with 124 additions and 0 deletions

26
Weihnachtsbeleuchtung.lua Normal file
View File

@@ -0,0 +1,26 @@
SERVICE_NAME = "Weihnachtsbeleuchtung"
SERVICE_VERSION = "1.0.0"
function thrawn_on_start()
thrawn_register_service(SERVICE_NAME)
thrawn_log("Starting LUA Service " .. SERVICE_NAME)
thrawn_schedule("0 00 01 * * *", "on_deactivate")
thrawn_schedule("0 00 16 * * *", "on_activtate")
thrawn_schedule("0 00 06 * * *", "on_activtate")
thrawn_schedule("0 00 10 * * *", "on_deactivate")
end
function thrawn_on_update(state)
end
function on_activtate(time)
thrawn_publish("kueche/lights/girlande/on", "1")
end
function on_deactivate(time)
thrawn_publish("kueche/lights/girlande/on", "0")
end