ffw/sleep adde + some minor fixes
This commit is contained in:
parent
34800bf5d9
commit
b554be3d6b
@ -484,7 +484,7 @@ class tradfri_light(base):
|
|||||||
TX_FILTER_DATA_KEYS = [KEY_OUTPUT_0, KEY_BRIGHTNESS, KEY_COLOR_TEMP, KEY_BRIGHTNESS_FADE]
|
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_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]
|
RX_FILTER_DATA_KEYS = [KEY_OUTPUT_0, KEY_BRIGHTNESS, KEY_COLOR_TEMP]
|
||||||
|
|
||||||
def __init__(self, mqtt_client, topic):
|
def __init__(self, mqtt_client, topic):
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
import devices
|
import devices
|
||||||
from function.stairway import stairway
|
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.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
|
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 inspect
|
||||||
import logging
|
import logging
|
||||||
@ -32,8 +32,9 @@ class all_functions(object):
|
|||||||
self.gfw_dirk = ground_floor_west_dirk(self.mqtt_client)
|
self.gfw_dirk = ground_floor_west_dirk(self.mqtt_client)
|
||||||
# first floor west
|
# first floor west
|
||||||
self.ffw_julian = first_floor_west_julian(self.mqtt_client)
|
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_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
|
# first floor east
|
||||||
self.ffe_floor = first_floor_east_floor(self.mqtt_client)
|
self.ffe_floor = first_floor_east_floor(self.mqtt_client)
|
||||||
self.ffe_kitchen = first_floor_east_kitchen(self.mqtt_client)
|
self.ffe_kitchen = first_floor_east_kitchen(self.mqtt_client)
|
||||||
|
@ -100,6 +100,7 @@ class first_floor_east_sleep(room_shelly_tradfri_light):
|
|||||||
def all_off(self, device=None, key=None, data=None):
|
def all_off(self, device=None, key=None, data=None):
|
||||||
super().all_off(device, key, data)
|
super().all_off(device, key, data)
|
||||||
self.bed_light_di_tradfri.set_output_0(False)
|
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):
|
class first_floor_east_living(room_shelly_tradfri_light):
|
||||||
|
@ -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)
|
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):
|
class first_floor_west_bath(object):
|
||||||
def __init__(self, mqtt_client):
|
def __init__(self, mqtt_client):
|
||||||
# radiator valve
|
# radiator valve
|
||||||
self.radiator_function = radiator_function(mqtt_client, config.TOPIC_FFW_BATH_RADIATOR_VALVE_ZIGBEE,
|
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)
|
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)
|
||||||
|
@ -97,8 +97,7 @@ class room_shelly_motion_sensor(room_shelly):
|
|||||||
|
|
||||||
def reset_timer(self, device=None, key=None, data=None):
|
def reset_timer(self, device=None, key=None, data=None):
|
||||||
self.main_light_timer = None
|
self.main_light_timer = None
|
||||||
self.motion_detected_1 = False
|
self.gui_main_light.set_timer('-')
|
||||||
self.motion_detected_2 = False
|
|
||||||
|
|
||||||
def cyclic_task(self, cyclic_task):
|
def cyclic_task(self, cyclic_task):
|
||||||
if self.main_light_timer is not None:
|
if self.main_light_timer is not None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user