added additional devices to all off functionality

This commit is contained in:
Dirk Alders 2022-12-22 08:10:56 +01:00
parent da53b3638f
commit 713bf4d017
2 changed files with 13 additions and 1 deletions

View File

@ -47,6 +47,10 @@ class first_floor_east_dining(room_shelly):
#
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):
if data != self.main_light_shelly_last:
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)
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)
# bed light
@ -203,6 +207,11 @@ class first_floor_east_living(room_shelly_tradfri_light):
#
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):
rv = []
for i in range(1, 7):

View File

@ -49,3 +49,6 @@ class ground_floor_west_dirk(room_shelly_tradfri_light):
def __init__(self, mqtt_client):
super().__init__(mqtt_client, "shellies/dirk", "gui/gfw_sw_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)