Smarthome Functionen
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

first_floor_west.py 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. #
  4. import config
  5. import devices
  6. import logging
  7. from function.modules import radiator_function
  8. from function.rooms import room_shelly, room_shelly_tradfri_light
  9. from function.videv import videv_switch_brightness, videv_switch_brightness_color_temp
  10. try:
  11. from config import APP_NAME as ROOT_LOGGER_NAME
  12. except ImportError:
  13. ROOT_LOGGER_NAME = 'root'
  14. logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
  15. class first_floor_west_julian(room_shelly_tradfri_light):
  16. # http://shelly1l-3C6105E43452
  17. def __init__(self, mqtt_client):
  18. 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)
  19. #
  20. self.main_light_videv = videv_switch_brightness_color_temp(
  21. mqtt_client, config.TOPIC_FFW_JULIAN_MAIN_LIGHT_VIDEV,
  22. self.main_light_shelly, devices.shelly.KEY_OUTPUT_0,
  23. self.main_light_tradfri, devices.tradfri_light.KEY_BRIGHTNESS,
  24. self.main_light_tradfri, devices.tradfri_light.KEY_COLOR_TEMP
  25. )
  26. class first_floor_west_bath(object):
  27. def __init__(self, mqtt_client):
  28. # radiator valve
  29. self.radiator_function = radiator_function(mqtt_client, config.TOPIC_FFW_BATH_RADIATOR_VALVE_ZIGBEE,
  30. config.TOPIC_FFW_BATH_RADIATOR_VALVE_GUI, config.DEFAULT_TEMPERATURE_FFW_BATH)
  31. def all_off(self):
  32. pass
  33. class first_floor_west_living(room_shelly_tradfri_light):
  34. # http://shelly1l-84CCA8ACE6A1
  35. def __init__(self, mqtt_client):
  36. super().__init__(mqtt_client, config.TOPIC_FFW_LIVINGROOM_MAIN_LIGHT_SHELLY,
  37. config.TOPIC_FFW_LIVINGROOM_MAIN_LIGHT_GUI, config.TOPIC_FFW_LIVINGROOM_MAIN_LIGHT_ZIGBEE)
  38. #
  39. self.main_light_videv = videv_switch_brightness_color_temp(
  40. mqtt_client, config.TOPIC_FFW_LIVINGROOM_MAIN_LIGHT_VIDEV,
  41. self.main_light_shelly, devices.shelly.KEY_OUTPUT_0,
  42. self.main_light_tradfri, devices.tradfri_light.KEY_BRIGHTNESS,
  43. self.main_light_tradfri, devices.tradfri_light.KEY_COLOR_TEMP
  44. )
  45. class first_floor_west_sleep(room_shelly_tradfri_light):
  46. # http://shelly1-3494546A51F2
  47. def __init__(self, mqtt_client):
  48. 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)
  49. #
  50. self.main_light_videv = videv_switch_brightness(
  51. mqtt_client, config.TOPIC_FFW_SLEEP_MAIN_LIGHT_VIDEV,
  52. self.main_light_shelly, devices.shelly.KEY_OUTPUT_0,
  53. self.main_light_tradfri, devices.tradfri_light.KEY_BRIGHTNESS
  54. )