ffw/sleep adde + some minor fixes

This commit is contained in:
Dirk Alders 2023-01-14 13:27:36 +01:00
parent 34800bf5d9
commit b554be3d6b
6 changed files with 20 additions and 12 deletions

View File

@ -8,4 +8,4 @@
"emmet.includeLanguages": {
"django-html": "html"
}
}
}

View File

@ -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):

View File

@ -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)

View File

@ -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):

View File

@ -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)

View File

@ -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: