diff --git a/.vscode/settings.json b/.vscode/settings.json index bb75302..aece2c1 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -8,4 +8,4 @@ "emmet.includeLanguages": { "django-html": "html" } -} \ No newline at end of file +} diff --git a/devices/__init__.py b/devices/__init__.py index d5b5a40..5411f3d 100644 --- a/devices/__init__.py +++ b/devices/__init__.py @@ -484,7 +484,7 @@ class tradfri_light(base): TX_FILTER_DATA_KEYS = [KEY_OUTPUT_0, KEY_BRIGHTNESS, KEY_COLOR_TEMP, KEY_BRIGHTNESS_FADE] # RX_KEYS = [KEY_LINKQUALITY, KEY_OUTPUT_0, KEY_BRIGHTNESS, KEY_COLOR_TEMP] - RX_IGNORE_KEYS = ['update', 'color_mode'] + RX_IGNORE_KEYS = ['update', 'color_mode', 'color_temp_startup'] RX_FILTER_DATA_KEYS = [KEY_OUTPUT_0, KEY_BRIGHTNESS, KEY_COLOR_TEMP] def __init__(self, mqtt_client, topic): diff --git a/function/__init__.py b/function/__init__.py index 3a3cf1d..c994791 100644 --- a/function/__init__.py +++ b/function/__init__.py @@ -4,7 +4,7 @@ import devices from function.stairway import stairway from function.ground_floor_west import ground_floor_west_floor, ground_floor_west_marion, ground_floor_west_dirk -from function.first_floor_west import first_floor_west_julian, first_floor_west_living, first_floor_west_bath +from function.first_floor_west import first_floor_west_julian, first_floor_west_living, first_floor_west_bath, first_floor_west_sleep from function.first_floor_east import first_floor_east_floor, first_floor_east_kitchen, first_floor_east_dining, first_floor_east_sleep, first_floor_east_living import inspect import logging @@ -32,8 +32,9 @@ class all_functions(object): self.gfw_dirk = ground_floor_west_dirk(self.mqtt_client) # first floor west self.ffw_julian = first_floor_west_julian(self.mqtt_client) - self.ffw_living = first_floor_west_living(self.mqtt_client) self.ffw_bath = first_floor_west_bath(self.mqtt_client) + self.ffw_living = first_floor_west_living(self.mqtt_client) + self.ffw_sleep = first_floor_west_sleep(self.mqtt_client) # first floor east self.ffe_floor = first_floor_east_floor(self.mqtt_client) self.ffe_kitchen = first_floor_east_kitchen(self.mqtt_client) diff --git a/function/first_floor_east.py b/function/first_floor_east.py index e526319..5261749 100644 --- a/function/first_floor_east.py +++ b/function/first_floor_east.py @@ -100,6 +100,7 @@ class first_floor_east_sleep(room_shelly_tradfri_light): def all_off(self, device=None, key=None, data=None): super().all_off(device, key, data) self.bed_light_di_tradfri.set_output_0(False) + self.bed_light_ma_powerplug.set_output_0(False) class first_floor_east_living(room_shelly_tradfri_light): diff --git a/function/first_floor_west.py b/function/first_floor_west.py index d2591ef..cde09bd 100644 --- a/function/first_floor_west.py +++ b/function/first_floor_west.py @@ -21,14 +21,21 @@ class first_floor_west_julian(room_shelly_tradfri_light): super().__init__(mqtt_client, config.TOPIC_FFW_JULIAN_MAIN_LIGHT_SHELLY, config.TOPIC_FFW_JULIAN_MAIN_LIGHT_GUI, config.TOPIC_FFW_JULIAN_MAIN_LIGHT_ZIGBEE) -class first_floor_west_living(room_shelly): - # http://shelly1l-84CCA8ACE6A1 - def __init__(self, mqtt_client): - super().__init__(mqtt_client, config.TOPIC_FFW_LIVINGROOM_MAIN_LIGHT_SHELLY, config.TOPIC_FFW_LIVINGROOM_MAIN_LIGHT_GUI) - - class first_floor_west_bath(object): def __init__(self, mqtt_client): # radiator valve self.radiator_function = radiator_function(mqtt_client, config.TOPIC_FFW_BATH_RADIATOR_VALVE_ZIGBEE, config.TOPIC_FFW_BATH_RADIATOR_VALVE_GUI, config.DEFAULT_TEMPERATURE_FFW_BATH) + + +class first_floor_west_living(room_shelly_tradfri_light): + # http://shelly1l-84CCA8ACE6A1 + def __init__(self, mqtt_client): + super().__init__(mqtt_client, config.TOPIC_FFW_LIVINGROOM_MAIN_LIGHT_SHELLY, + config.TOPIC_FFW_LIVINGROOM_MAIN_LIGHT_GUI, config.TOPIC_FFW_LIVINGROOM_MAIN_LIGHT_ZIGBEE) + + +class first_floor_west_sleep(room_shelly_tradfri_light): + # http://shelly1-3494546A51F2 + def __init__(self, mqtt_client): + super().__init__(mqtt_client, config.TOPIC_FFW_SLEEP_MAIN_LIGHT_SHELLY, config.TOPIC_FFW_SLEEP_MAIN_LIGHT_GUI, config.TOPIC_FFW_SLEEP_MAIN_LIGHT_ZIGBEE) diff --git a/function/rooms.py b/function/rooms.py index b1126c8..a4ef4ca 100644 --- a/function/rooms.py +++ b/function/rooms.py @@ -97,8 +97,7 @@ class room_shelly_motion_sensor(room_shelly): def reset_timer(self, device=None, key=None, data=None): self.main_light_timer = None - self.motion_detected_1 = False - self.motion_detected_2 = False + self.gui_main_light.set_timer('-') def cyclic_task(self, cyclic_task): if self.main_light_timer is not None: