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)
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)
def __init__(self, device, xiaomi_hub, device_name, device_class): """Initialize the XiaomiNatgasSensor.""" self._state = False self._data_key = 'alarm' self._device_class = device_class self._density = 0 XiaomiDevice.__init__(self, device, device_name, xiaomi_hub)
def __init__(self, device, xiaomi_hub): """Initialize the XiaomiDoorSensor.""" self._state = False self._data_key = 'status' self._open_since = 0 self._should_poll = False self._ghost_checked = False XiaomiDevice.__init__(self, device, 'Door Window Sensor', xiaomi_hub)
def __init__(self, device, name, data_key, xiaomi_hub): """Initialize the XiaomiPlug.""" self._state = False self._data_key = data_key self._in_use = False self._load_power = 0 self._power_consumed = 0 XiaomiDevice.__init__(self, device, name, xiaomi_hub)
def __init__(self, device, hass, xiaomi_hub): """Initialize the XiaomiMotionSensor.""" self._state = False self._hass = hass self._data_key = 'status' self._no_motion_since = 0 self._is_firing_motion = False XiaomiDevice.__init__(self, device, 'Motion Sensor', xiaomi_hub)
def __init__(self, device, hass, xiaomi_hub): """Initialize the XiaomiMotionSensor.""" self._state = False self._hass = hass self._data_key = 'status' self._no_motion_since = 0 self._should_poll = False self._ghost_checked = False XiaomiDevice.__init__(self, device, 'Motion Sensor', xiaomi_hub)
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)
def __init__(self, device, sensor_info, xiaomi_hub): """Initialize the XiaomiSensor.""" self.current_value = None self._data_key = sensor_info.data_key self._battery = None self._units = sensor_info.units self._max = sensor_info.max self._min = sensor_info.min self._value_modifier = sensor_info.value_modifier XiaomiDevice.__init__(self, device, sensor_info.name, xiaomi_hub)
def __init__(self, device, name, data_key, xiaomi_hub): """Initialize the XiaomiPlug.""" self._state = False self._data_key = data_key XiaomiDevice.__init__(self, device, name, xiaomi_hub)
def __init__(self, device, name, data_key, xiaomi_hub): """Initialize the XiaomiSensor.""" self.current_value = None self._data_key = data_key self._battery = None XiaomiDevice.__init__(self, device, name, xiaomi_hub)
def __init__(self, device, hass, xiaomi_hub): """Initialize the XiaomiButton.""" self._hass = hass XiaomiDevice.__init__(self, device, 'Cube', xiaomi_hub)
def __init__(self, device, name, data_key, hass, xiaomi_hub): """Initialize the XiaomiButton.""" self._is_down = False self._hass = hass self._data_key = data_key XiaomiDevice.__init__(self, device, name, xiaomi_hub)
def __init__(self, device, xiaomi_hub): """Initialize the XiaomiSmokeSensor.""" self._state = False self._data_key = 'alarm' self._density = 0 XiaomiDevice.__init__(self, device, 'Smoke Sensor', xiaomi_hub)
def __init__(self, device, xiaomi_hub): """Initialize the XiaomiDoorSensor.""" self._state = False self._data_key = 'status' self._open_since = 0 XiaomiDevice.__init__(self, device, 'Door Window Sensor', xiaomi_hub)
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)
def __init__(self, device, xiaomi_hub): """Initialize the XiaomiSmokeSensor.""" self._state = False self._data_key = 'alarm' XiaomiDevice.__init__(self, device, 'Smoke Sensor', xiaomi_hub)
def __init__(self, device, xiaomi_hub): """Initialize the XiaomiNatGasSensor.""" self._state = False self._data_key = 'alarm' self._density = 0 XiaomiDevice.__init__(self, device, 'Natgas Sensor', xiaomi_hub)
def __init__(self, device, name, data_key, xiaomi_hub): """Initialize the XiaomiSensor.""" self._data_key = data_key XiaomiDevice.__init__(self, device, name, xiaomi_hub)