def __init__(self, config):
     from NooLite_F import MotionSensor
     self._config = config
     self._sensor = MotionSensor(NooLite.DEVICE, config.get(CONF_CHANNEL),
                                 self._on_motion)
     self._time = time.time()
     self._timer = None
 def __init__(self, config, device):
     super().__init__(config, device, _BATTERY_DATA_INTERVAL)
     self._sensor = MotionSensor(device, self._channel, self._on_motion, self.low_battery)
     self._time = time.time()
     self._timer = None