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