From b4c872456dfb2c2f41e11ab30a5353ca3046f723 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian-Steffen=20M=C3=BCller?= Date: Tue, 15 Dec 2020 10:52:07 +0100 Subject: [PATCH] Added Wohnzimmergirlande --- Weihnachtsbeleuchtung.lua | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Weihnachtsbeleuchtung.lua b/Weihnachtsbeleuchtung.lua index cbe6c5f..cc6eff6 100644 --- a/Weihnachtsbeleuchtung.lua +++ b/Weihnachtsbeleuchtung.lua @@ -6,18 +6,19 @@ function thrawn_on_start() thrawn_log("Starting LUA Service " .. SERVICE_NAME) - thrawn_schedule("0 0 1 * * *", "on_deactivate") - thrawn_schedule("0 0 6 * * *", "on_activtate") - + thrawn_schedule("0 0 0 * * *", "off") + thrawn_schedule("0 0 6 * * *", "on") end function thrawn_on_update(state) end -function on_activtate(time) - thrawn_publish("kueche/lights/girlande/on/set", "1") +function on(time) + thrawn_publish(thrawn_create_topic_state("kueche/lights/girlande/on/set", "1")) + thrawn_publish(thrawn_create_topic_state("wohnzimmer/lights/wohnzimmergirlande/on/set", "1")) end -function on_deactivate(time) - thrawn_publish("kueche/lights/girlande/on/set", "0") +function off(time) + thrawn_publish(thrawn_create_topic_state("kueche/lights/girlande/on/set", "0")) + thrawn_publish(thrawn_create_topic_state("wohnzimmer/lights/wohnzimmergirlande/on/set", "0")) end