1234567891011121314151617181920212223242526272829 |
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- #
-
- import config
- import devices
- from function.modules import brightness_choose_n_action
- import logging
- from function.rooms import room_shelly_motion_sensor
- from function.videv import videv_switching
-
- 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 stairway(room_shelly_motion_sensor):
- def __init__(self, mqtt_client):
- # http://shelly1-3494546A9364
- super().__init__(mqtt_client, config.TOPIC_STW_STAIRWAY_MAIN_LIGHT_SHELLY, config.TOPIC_STW_STAIRWAY_MAIN_LIGHT_GUI,
- config.TOPIC_STW_STAIRWAY_MAIN_LIGHT_MOTION_SENSOR_GF, config.TOPIC_STW_STAIRWAY_MAIN_LIGHT_MOTION_SENSOR_FF,
- timer_value=config.USER_ON_TIME_STAIRWAYS)
- #
- self.main_light_videv = videv_switching(
- mqtt_client, config.TOPIC_STW_STAIRWAY_MAIN_LIGHT_VIDEV,
- self.main_light_shelly, devices.shelly.KEY_OUTPUT_0
- )
|