123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- #
-
- import config
- import devices
- import logging
- from function.modules import radiator_function
- from function.rooms import room_shelly, room_shelly_tradfri_light
- from function.videv import videv_switch_brightness, videv_switch_brightness_color_temp
-
-
- try:
- from config import APP_NAME as ROOT_LOGGER_NAME
- except ImportError:
- ROOT_LOGGER_NAME = 'root'
- logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
-
-
- class first_floor_west_julian(room_shelly_tradfri_light):
- # http://shelly1l-3C6105E43452
- def __init__(self, mqtt_client):
- 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)
- #
- self.main_light_videv = videv_switch_brightness_color_temp(
- mqtt_client, config.TOPIC_FFW_JULIAN_MAIN_LIGHT_VIDEV,
- self.main_light_shelly, devices.shelly.KEY_OUTPUT_0,
- self.main_light_tradfri, devices.tradfri_light.KEY_BRIGHTNESS,
- self.main_light_tradfri, devices.tradfri_light.KEY_COLOR_TEMP
- )
-
-
- 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)
-
- def all_off(self):
- pass
-
-
- 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)
- #
- self.main_light_videv = videv_switch_brightness_color_temp(
- mqtt_client, config.TOPIC_FFW_LIVINGROOM_MAIN_LIGHT_VIDEV,
- self.main_light_shelly, devices.shelly.KEY_OUTPUT_0,
- self.main_light_tradfri, devices.tradfri_light.KEY_BRIGHTNESS,
- self.main_light_tradfri, devices.tradfri_light.KEY_COLOR_TEMP
- )
-
-
- 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)
- #
- self.main_light_videv = videv_switch_brightness(
- mqtt_client, config.TOPIC_FFW_SLEEP_MAIN_LIGHT_VIDEV,
- self.main_light_shelly, devices.shelly.KEY_OUTPUT_0,
- self.main_light_tradfri, devices.tradfri_light.KEY_BRIGHTNESS
- )
|