From 0e45aed92670510d7125b529a26d72f556a40924 Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Sun, 14 Sep 2025 12:25:06 +0200 Subject: [PATCH] Removed 'old' topic definitions --- topic.py | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/topic.py b/topic.py index 280ad76..bd36133 100644 --- a/topic.py +++ b/topic.py @@ -66,9 +66,8 @@ LOC_FFW = 4 """ First floor west """ LOC_FFE = 5 """ First floor east """ -LOC_STW = 6 -""" Stairways """ -LOC_GAR = 7 +LOC_GAR = 6 +""" Garden """ # @@ -233,20 +232,4 @@ FUN_TOPIC = { def get_topic(stg, loc, roo, fun): - stg_topic = STG_TOPIC[stg] - loc_topic = LOC_TOPIC[loc] - roo_topic = ROO_TOPIC[roo] - fun_topic = FUN_TOPIC[fun] - s = '/'.join([stg_topic, loc_topic, roo_topic, fun_topic]) - # TODO: /!\ Changed TOPIC in VIDEV /!\ - Remove this line after changing nodered - TOPIC_STW_STAIRWAY_MAIN_LIGHT_VIDEV = "videv/stw/stairway/main_light" - if stg == STG_VDE and fun == FUN_DCK: - s = '/'.join([stg_topic, loc_topic, roo_topic, 'pc_dock']) - if stg == STG_VDE and fun == FUN_FLL: - s = '/'.join([stg_topic, loc_topic, roo_topic, 'floorlamp']) - if stg == STG_VDE and roo == ROO_STF and fun == FUN_MAL: - s = TOPIC_STW_STAIRWAY_MAIN_LIGHT_VIDEV - if stg == STG_VDE and fun == FUN_XTR: - s = '/'.join([stg_topic, loc_topic, roo_topic, 'xmas_tree']) - # TODO: /!\ Changed TOPIC in VIDEV /!\ - Remove this line after changing nodered - return s + return '/'.join([STG_TOPIC[stg], LOC_TOPIC[loc], ROO_TOPIC[roo], FUN_TOPIC[fun]])