added additional devices to all off functionality
This commit is contained in:
parent
da53b3638f
commit
713bf4d017
@ -47,6 +47,10 @@ class first_floor_east_dining(room_shelly):
|
|||||||
#
|
#
|
||||||
self.main_light_shelly_last = None
|
self.main_light_shelly_last = None
|
||||||
|
|
||||||
|
def all_off(self, device=None, key=None, data=None):
|
||||||
|
super().all_off(device, key, data)
|
||||||
|
self.floorlamp_powerplug.set_output_0(False)
|
||||||
|
|
||||||
def floorlamp_synchronisation(self, device, key, data):
|
def floorlamp_synchronisation(self, device, key, data):
|
||||||
if data != self.main_light_shelly_last:
|
if data != self.main_light_shelly_last:
|
||||||
logger.info("Synching \"%s\" floorlamp with main light (%s)", type(self).__name__, str(data))
|
logger.info("Synching \"%s\" floorlamp with main light (%s)", type(self).__name__, str(data))
|
||||||
@ -91,7 +95,7 @@ class first_floor_east_sleep_madi(room_shelly_tradfri_light):
|
|||||||
self.fade_light)
|
self.fade_light)
|
||||||
|
|
||||||
def all_off(self, device=None, key=None, data=None):
|
def all_off(self, device=None, key=None, data=None):
|
||||||
return 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)
|
||||||
|
|
||||||
# bed light
|
# bed light
|
||||||
@ -203,6 +207,11 @@ class first_floor_east_living(room_shelly_tradfri_light):
|
|||||||
#
|
#
|
||||||
self.main_light_shelly_last = None
|
self.main_light_shelly_last = None
|
||||||
|
|
||||||
|
def all_off(self, device=None, key=None, data=None):
|
||||||
|
super().all_off(device, key, data)
|
||||||
|
for floorlamp in self.__floorlamp_devices__():
|
||||||
|
floorlamp.set_output_0(False)
|
||||||
|
|
||||||
def __floorlamp_devices__(self):
|
def __floorlamp_devices__(self):
|
||||||
rv = []
|
rv = []
|
||||||
for i in range(1, 7):
|
for i in range(1, 7):
|
||||||
|
@ -49,3 +49,6 @@ class ground_floor_west_dirk(room_shelly_tradfri_light):
|
|||||||
def __init__(self, mqtt_client):
|
def __init__(self, mqtt_client):
|
||||||
super().__init__(mqtt_client, "shellies/dirk", "gui/gfw_sw_dirk",
|
super().__init__(mqtt_client, "shellies/dirk", "gui/gfw_sw_dirk",
|
||||||
"zigbee_eg_w/light/dirk", "gui/gfw_br_dirk", "gui/gfw_ct_dirk")
|
"zigbee_eg_w/light/dirk", "gui/gfw_br_dirk", "gui/gfw_ct_dirk")
|
||||||
|
|
||||||
|
def all_off(self, device=None, key=None, data=None):
|
||||||
|
super().all_off(device, key, data)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user