示例#1
0
 def __init__(self, device, name, xiaomi_hub, data_key, device_class):
     """Initialize the XiaomiSmokeSensor."""
     self._data_key = data_key
     self._device_class = device_class
     self._should_poll = False
     self._density = 0
     XiaomiDevice.__init__(self, device, name, xiaomi_hub)
示例#2
0
 def __init__(self, device, name, xiaomi_hub, data_key, device_class):
     """Initialize the XiaomiSmokeSensor."""
     self._data_key = data_key
     self._device_class = device_class
     self._should_poll = False
     self._density = 0
     XiaomiDevice.__init__(self, device, name, xiaomi_hub)
示例#3
0
    def __init__(self, device, name, xiaomi_hub):
        """Initialize the XiaomiGatewayLight."""
        self._data_key = 'rgb'
        self._rgb = (255, 255, 255)
        self._brightness = 180

        XiaomiDevice.__init__(self, device, name, xiaomi_hub)
示例#4
0
    def __init__(self, device, name, xiaomi_hub):
        """Initialize the XiaomiGatewayLight."""
        self._data_key = 'rgb'
        self._hs = (0, 0)
        self._brightness = 100

        XiaomiDevice.__init__(self, device, name, xiaomi_hub)
示例#5
0
 def __init__(self, device, name, data_key, supports_power_consumption,
              xiaomi_hub):
     """Initialize the XiaomiPlug."""
     self._data_key = data_key
     self._in_use = None
     self._load_power = None
     self._power_consumed = None
     self._supports_power_consumption = supports_power_consumption
     XiaomiDevice.__init__(self, device, name, xiaomi_hub)
示例#6
0
 def __init__(self, device, name, data_key, xiaomi_hub):
     """Initialize the XiaomiGenericCover."""
     self._data_key = data_key
     self._pos = 0
     XiaomiDevice.__init__(self, device, name, xiaomi_hub)
示例#7
0
 def __init__(self, device, name, data_key, xiaomi_hub):
     """Initialize the XiaomiSensor."""
     self._data_key = data_key
     XiaomiDevice.__init__(self, device, name, xiaomi_hub)
示例#8
0
 def __init__(self, device, name, data_key, xiaomi_hub):
     """Initialize the XiaomiSensor."""
     self._data_key = data_key
     XiaomiDevice.__init__(self, device, name, xiaomi_hub)
示例#9
0
 def __init__(self, device, name, data_key, xiaomi_hub):
     """Initialize the XiaomiGenericCover."""
     self._data_key = data_key
     self._pos = 0
     XiaomiDevice.__init__(self, device, name, xiaomi_hub)