diff --git a/devdi b/devdi index 8f8ace1..118e80f 160000 --- a/devdi +++ b/devdi @@ -1 +1 @@ -Subproject commit 8f8ace13c131abf9c4dfb79087fa1c13c76805d2 +Subproject commit 118e80f070072d7ac65531bfdf316baf04901a9a diff --git a/function/first_floor_west.py b/function/first_floor_west.py index d874c57..e54976a 100644 --- a/function/first_floor_west.py +++ b/function/first_floor_west.py @@ -185,6 +185,8 @@ class first_floor_west_sleep(room): self.main_light_tradfri = pd.get(props.STG_ZFW, loc, roo, props.FUN_MAL) # heating function self.heating_valve = pd.get(props.STG_ZFW, loc, roo, props.FUN_HEA) + # window light + self.window_light = pd.get(props.STG_ZFW, loc, roo, props.FUN_WIL) super().__init__(mqtt_client, pd, vd) # @@ -198,6 +200,9 @@ class first_floor_west_sleep(room): ) self.heating_function.add_callback(None, None, set_radiator_data, True) + # main light + self.main_light_shelly.add_callback(self.main_light_shelly.KEY_OUTPUT_0, None, self.window_light.set_output_0_mcb, True) + # # Virtual Device Interface # @@ -212,3 +217,10 @@ class first_floor_west_sleep(room): mqtt_client, config.TOPIC_FFW_SLEEP_HEATING_VALVE_VIDEV, self.heating_function ) + # window lamp + self.windowlamp_videv = videv_switch_brightness_color_temp( + mqtt_client, config.TOPIC_FFW_SLEEP_WINDOW_LAMP_VIDEV, + self.window_light, self.window_light.KEY_OUTPUT_0, + self.window_light, self.window_light.KEY_BRIGHTNESS, + self.window_light, self.window_light.KEY_COLOR_TEMP + ) diff --git a/function/ground_floor_west.py b/function/ground_floor_west.py index d8372b1..3031644 100644 --- a/function/ground_floor_west.py +++ b/function/ground_floor_west.py @@ -68,6 +68,8 @@ class ground_floor_west_marion(room): self.main_light_shelly = pd.get(props.STG_SHE, loc, roo, props.FUN_MAL) # heating function self.heating_valve = pd.get(props.STG_ZGW, loc, roo, props.FUN_HEA) + # window light + self.window_light = pd.get(props.STG_ZGW, loc, roo, props.FUN_WIL) super().__init__(mqtt_client, pd, vd) # @@ -81,6 +83,9 @@ class ground_floor_west_marion(room): ) self.heating_function.add_callback(None, None, set_radiator_data, True) + # main light + self.main_light_shelly.add_callback(self.main_light_shelly.KEY_OUTPUT_0, None, self.window_light.set_output_0_mcb, True) + # # Virtual Device Interface # @@ -92,6 +97,13 @@ class ground_floor_west_marion(room): mqtt_client, config.TOPIC_GFW_MARION_HEATING_VALVE_VIDEV, self.heating_function ) + # window lamp + self.windowlamp_videv = videv_switch_brightness_color_temp( + mqtt_client, config.TOPIC_GFW_MARION_WINDOW_LAMP_VIDEV, + self.window_light, self.window_light.KEY_OUTPUT_0, + self.window_light, self.window_light.KEY_BRIGHTNESS, + self.window_light, self.window_light.KEY_COLOR_TEMP + ) class ground_floor_west_dirk(room): diff --git a/topics.py b/topics.py index 7af6162..6ddac40 100644 --- a/topics.py +++ b/topics.py @@ -12,6 +12,7 @@ TOPIC_GFW_FLOOR_MAIN_LIGHT_VIDEV = "videv/gfw/floor/main_light" # marion TOPIC_GFW_MARION_MAIN_LIGHT_VIDEV = "videv/gfw/marion/main_light" TOPIC_GFW_MARION_HEATING_VALVE_VIDEV = "videv/gfw/marion/heating_valve" +TOPIC_GFW_MARION_WINDOW_LAMP_VIDEV = "videv/gfw/marion/window_light" # dirk TOPIC_GFW_DIRK_MAIN_LIGHT_VIDEV = "videv/gfw/dirk/main_light" @@ -48,6 +49,7 @@ TOPIC_FFW_LIVINGROOM_HEATING_VALVE_VIDEV = "videv/ffw/livingroom/heating_valve" # sleep TOPIC_FFW_SLEEP_MAIN_LIGHT_VIDEV = "videv/ffw/sleep/main_light" TOPIC_FFW_SLEEP_HEATING_VALVE_VIDEV = "videv/ffw/sleep/heating_valve" +TOPIC_FFW_SLEEP_WINDOW_LAMP_VIDEV = "videv/ffw/sleep/window_light" # first floor east