97 lines
3.8 KiB
Python

from devdi import rooms
#
# rooms
#
class ffe_livingroom(rooms.ffe_livingroom):
def __init__(self, mqtt_client):
super().__init__(mqtt_client)
# Enable/disable hue device, on power on/off
self.switch_main_light.add_callback(self.switch_main_light.KEY_OUTPUT_0, True, self.light_main_light.power_on)
self.switch_main_light.add_callback(self.switch_main_light.KEY_OUTPUT_0, False, self.light_main_light.power_off)
class ffe_sleep(rooms.ffe_sleep):
def __init__(self, mqtt_client):
super().__init__(mqtt_client)
# Enable/disable hue device, on power on/off
self.switch_main_light.add_callback(self.switch_main_light.KEY_OUTPUT_0, True, self.light_main_light.power_on)
self.switch_main_light.add_callback(self.switch_main_light.KEY_OUTPUT_0, False, self.light_main_light.power_off)
class ffw_julian(rooms.ffw_julian):
def __init__(self, mqtt_client):
super().__init__(mqtt_client)
# Enable/disable hue device, on power on/off
self.switch_main_light.add_callback(self.switch_main_light.KEY_OUTPUT_0, True, self.light_main_light.power_on)
self.switch_main_light.add_callback(self.switch_main_light.KEY_OUTPUT_0, False, self.light_main_light.power_off)
class ffw_livingroom(rooms.ffw_livingroom):
def __init__(self, mqtt_client):
super().__init__(mqtt_client)
# Enable/disable hue device, on power on/off
self.switch_main_light.add_callback(self.switch_main_light.KEY_OUTPUT_0, True, self.light_main_light.power_on)
self.switch_main_light.add_callback(self.switch_main_light.KEY_OUTPUT_0, False, self.light_main_light.power_off)
class ffw_sleep(rooms.ffw_sleep):
def __init__(self, mqtt_client):
super().__init__(mqtt_client)
# Enable/disable hue device, on power on/off
self.switch_main_light.add_callback(self.switch_main_light.KEY_OUTPUT_0, True, self.light_main_light.power_on)
self.switch_main_light.add_callback(self.switch_main_light.KEY_OUTPUT_0, False, self.light_main_light.power_off)
class gfw_dirk(rooms.gfw_dirk):
def __init__(self, mqtt_client):
super().__init__(mqtt_client)
# Enable/disable hue device, on power on/off
self.switch_main_light.add_callback(self.switch_main_light.KEY_OUTPUT_0, True, self.light_main_light.power_on)
self.switch_main_light.add_callback(self.switch_main_light.KEY_OUTPUT_0, False, self.light_main_light.power_off)
class gfw_floor(rooms.gfw_floor):
def __init__(self, mqtt_client):
super().__init__(mqtt_client)
# Enable/disable hue device, on power on/off
self.switch_main_light.add_callback(self.switch_main_light.KEY_OUTPUT_0, True, self.light_main_light.power_on)
self.switch_main_light.add_callback(self.switch_main_light.KEY_OUTPUT_0, False, self.light_main_light.power_off)
#
# Locations
#
class ffe(object):
def __init__(self, mqtt_client):
self.diningroom = rooms.ffe_diningroom(mqtt_client)
self.floor = rooms.ffe_floor(mqtt_client)
self.kitchen = rooms.ffe_kitchen(mqtt_client)
self.livingroom = ffe_livingroom(mqtt_client)
self.sleep = ffe_sleep(mqtt_client)
class ffw(object):
def __init__(self, mqtt_client):
self.bath = rooms.ffw_bath(mqtt_client)
self.floor = rooms.ffw_floor(mqtt_client)
self.julian = ffw_julian(mqtt_client)
self.livingroom = ffw_livingroom(mqtt_client)
self.sleep = ffw_sleep(mqtt_client)
class gfw(object):
def __init__(self, mqtt_client):
self.dirk = gfw_dirk(mqtt_client)
self.floor = gfw_floor(mqtt_client)
self.marion = rooms.gfw_marion(mqtt_client)
class house(object):
def __init__(self, mqtt_client):
self.ffe = ffe(mqtt_client)
self.ffw = ffw(mqtt_client)
self.gfw = gfw(mqtt_client)
self.stairway = rooms.stairway(mqtt_client)